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

Support archive

Exp channel entries not parsing when used in low variables.

RJ 1 Aug 2012 21:40 problem, active

In my blank template:

{exp:low_variables:single var="em_masthead"}

Low variable em_masthead:
{exp:channel:entries limit="1" channel="email" url_title="{segment_3}" status="not closed"}

Hello World {title}


{/exp:channel:entries}

When i go to my link
mysite.com/templategroup/templatename/segment_3

I get a blank page.

This happens even if I enable early parsing or not.

Replies

  1. Low 2 Aug 2012 06:25

    Hi RJ,

    This is due to parse order. Take a look at this blog post. In it you'll see that LVs can be parsed on 3 stages:

    1. Early, in the global variable syntax (eg. {em_masthead})
    2. Middle, as tags (eg. {exp:low_variables:single var="em_masthead"})
    3. Late, in the global variable syntax.

    In your variable, you've got a segment variable, which is parsed early, so you'll need the first stage in order for it to parse correctly.

    So, try using the variable syntax instead of the tag syntax.

  2. mheavers 21 Nov 2012 20:39

    Hi - I'm having a similar problem - I've read this post:

    http://jamiepittock.com/words/2012/ap...

    but its suggestions did not seem to work for me - I'm wondering if my nesting structure is a bit more complicated. Here is my setup:

     
    {exp:low_variables:pair var="var_home_content"}
    {home_share_modules}
    <h3>{share_module_title}</h3>
    {exp:low_variables:parse var="var_{url_title}"}
    {/home_share_modules}
    {/exp:low_variables:pair}


    and in the low variable parse called from variables:parse -

     
    {exp:channel:entries channel="recipes" dynamic="off" limit="5"}
    {recipe_images}
    <img class="slider_image" src="{recipes_carousel_image}" alt="{title}"/>
    {/recipe_images}
    {/exp:channel:entries}


    where {recipe_images} is a playa field. Is this possible with the variable, or do I need to put this in an embed?

  3. Low 21 Nov 2012 21:17

    What does the Template Debugging info tell you? It should show what the tags generated actually look like.