How to display Low Variable inside channel entries tag?
I have a low variable that has nothing to do with my channel entry. It is an Asset variable. When I output the variable outside of the channel entries tag, it works just fine. When I try to output it from inside the channel entry. It will not output.
this works:
{exp:low_variables:pair var="default_marquee"}
<img src="{url}" alt="{alt_text}" />
{/exp:low_variables:pair}
this does not:
{exp:channel:entries channel="page"}
{exp:low_variables:pair var="default_marquee"}
<img src="{url}" alt="{alt_text}" />
{/exp:low_variables:pair}
{/exp:channel:entries}
I'm probably making a rookie mistake. Thanks for your help.
Replies
nrackleff 6 Mar 2013 23:41
Forgot to mention I am using LV 2.3.4 with EE 2.5.5. Early parsing is on. It also does not work if I change "pair" to "parse" in the tag. I just get an empty image tag in the HTML.
Low 7 Mar 2013 09:10
If you're using the Tag syntax (as opposed to the variable syntax), having early parsing on is irrelevant.
That said, I reckon the {url} and {alt_text} variables are conflicting with variables inside the Entries tag; they are parsed before LV can get to it.
You could circumvent this issue by placing the Pair tag in another Low Variable, and calling that with the Single tag. So, create a var called 'default_marquee_snippet' (or something), and add this to it:
Then use this inside the Entries tag:
nrackleff 13 Mar 2013 03:29
I will give that a try. Thanks for your help.