Select Entries across sites
EE 3.3.4
LV 3.0.4
I've got a select entries variable in default_site that I want to use to populate a channel:entries tag in site 2 but no matter what I do nothing works. I found this Stack Exchange post which should work but it's not working for me.
My current code is:
{exp:low_variables:parse var='default_site:lv-site-nav-top'}
{exp:channel:entries
site="default_site"
entry_id="{lv-site-nav-top:data}"
channel="directors"
status="Open"
dynamic="no"
disable="member_data|pagination|comments|relationships|
categories"
sort="asc"
orderby="title"
}
<li><a href="{comment_url_title_auto_path}">{title}</a></li>
{/exp:channel:entries}
{/exp:low_variables:parse}
but I've also tried this:
{exp:channel:entries
site="default_site"
entry_id="{exp:low_variables:parse var='{default_site:lv-site-nav-top'}"
channel="directors"
status="Open"
dynamic="no"
disable="member_data|pagination|comments|relationships|categories"
sort="asc"
orderby="title"
parse="inward"
}
<li><a href="{comment_url_title_auto_path}">{title}</a></li>
{/exp:channel:entries}
Replies
Low 5 Feb 2018 20:08
the
:data
modifier is specific to the Playa var type, if I'm not mistaken. Definitely not core LV functionality. It is core functionality -- been a while since I saw my own code ;)So, try using the first example, but use {lv-site-nav-top} inside the tag pair instead.
Otherwise, turn on template debugging and copy/paste all lines that mention LV here.
Sean 5 Feb 2018 20:39
Low, interestingly it shows returning no results. But when I view on default_site it outputs correctly and in the LV CP page data has been entered.
I've also copied/pasted the variable name and no change.
In the debugging I copied from another variable that also shows no data returned and not outputting correctly - but works in the other site.
Low 6 Feb 2018 07:51
Hmm, need to do some testing.
Meanwhile, in your second example, try this:
...as the parameter value (not using both tag syntax and variable syntax), and try to put all parameters on a single line without line breaks. EE's template parser isn't fond of nesting tags like that, but it might work, IIRC.
Sean 6 Feb 2018 14:26
Low,
When I do the above it outputs all entries in the directors channel. Not limiting to the ones selected in low variables
Sean 6 Feb 2018 20:54
Low,
mysteriously it's working now. wiht no changes since I last posted