Low Variables + Conditionals?
Is it possible with Low Variables (1.2.5, EE 2.1) to check to see if the variable is empty? I.e.,
{if {my_variable}!=''}My variable: {my_variable}{/if}
In the examples, the <br /> in this line would be output if the variable was empty, which would be undesirable:
<span class="fn">{low_contact_fn}</span><br />
Thanks,
Mark
Replies
Low 24 Aug 2010 19:50
Hey Mark,
At the moment, you can only use vars in conditionals if you enable early parsing for those variables. Use syntax like you would with segment variables, like this:
{if my_variable != ''}my conditional stuff{/if}
I'm working on allowing conditionals using the {exp:low_variables:parse} template tags.
Clearbold, LLC 25 Aug 2010 13:57
Thanks for adding support in v1.3.1. Works great!