Conditional show Low Variable Playa Sjoerd 22 May 2014 11:14 question, complete http://pastie.org/9198679#7-8 Replies Low 22 May 2014 11:58 This has a typo: {if lv_brochures_news} == ""} If used like that, you'd need to enable Early Parsing for that var, and use this syntax: {if lv_brochures_news == ""} ...without the } at the end of the var name. Or just use the {count} way: {exp:low_variables:pair var="lv_news_brochures"} {if count == 1}<ul>{/if} <li>...</li> {if count == total_results}</ul>{/if} {/exp:low_variables:pair} Sjoerd 22 May 2014 16:48 OK, the count method works, thanks. But how about a PT Switch? This does not work (some tags are stripped by GS) {if lv_brochures_news =="y"} {exp:transcribe:replace name="latest_news"} {exp:channel:entries channel="news" limit="3"}{title} {/exp:channel:entries} {/if} Low 22 May 2014 20:15 Has lv_brochures_news got Early Parsing enabled? And is the value actually 'y' when it's on? Sjoerd 22 May 2014 20:51 Both: yes... Sjoerd 23 May 2014 06:21 It works perfectly: sorry: typo :-( Unbelievable how may times you can read code without seeing it. Thanks anyway! Low 23 May 2014 06:56 Well there you go. Glad you got it working.
Replies
Low 22 May 2014 11:58
This has a typo:
If used like that, you'd need to enable Early Parsing for that var, and use this syntax:
...without the } at the end of the var name.
Or just use the {count} way:
Sjoerd 22 May 2014 16:48
OK, the count method works, thanks.
But how about a PT Switch? This does not work (some tags are stripped by GS)
{if lv_brochures_news =="y"}
{exp:channel:entries channel="news" limit="3"}
{/exp:channel:entries}
{/if}
Low 22 May 2014 20:15
Has lv_brochures_news got Early Parsing enabled? And is the value actually 'y' when it's on?
Sjoerd 22 May 2014 20:51
Both: yes...
Sjoerd 23 May 2014 06:21
It works perfectly: sorry: typo :-( Unbelievable how may times you can read code without seeing it. Thanks anyway!
Low 23 May 2014 06:56
Well there you go. Glad you got it working.