All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Select Entries across sites

Sean 5 Feb 2018 19:18 question, complete

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

  1. 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.

  2. 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.


    0.040471 / 5.88MB Calling Tag: {exp:low_variables:parse var="default_site:lv-site-nav-top"}
    0.041673 / 5.88MB Low Variables: Getting variables from Database
    0.059605 / 6.41MB Low Variables: Var default_site:lv-site-nav-top not found -- returning no results
    0.059639 / 6.41MB Returning No Results Content
    0.059678 / 6.41MB -> Data Returned

    0.060336 / 6.41MB Calling Tag: {exp:low_variables:parse var="default_site:lv-friends-neighbors"}
    0.061496 / 6.41MB Low Variables: Getting variables from Session Cache
    0.061515 / 6.42MB Low Variables: Var default_site:lv-friends-neighbors not found -- returning no results
    0.061531 / 6.42MB Returning No Results Content
    0.061562 / 6.42MB -> Data Returned

  3. Low 6 Feb 2018 07:51

    Hmm, need to do some testing.

    Meanwhile, in your second example, try this:

    entry_id="{exp:low_variables:parse var='default_site:lv-site-nav-top'}" 


    ...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.

  4. 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

  5. Sean 6 Feb 2018 20:54

    Low,

    mysteriously it's working now. wiht no changes since I last posted