elseif shorthand?

Jaxel

Well-known member
So you can do conditions in templates with:

Code:
<xen:if is="$condition1">
    stuff
<xen:elseif is="$condition2"/>
    other stuff
<xen:else>
    more stuff
</xen:if>

There is also a shorthand:

Code:
{xen:if '$condition1', 'stuff', 'more stuff'}

That shorthand can't do an "elseif". Is there a way I can do that shorthand?
 

Snog

Well-known member
Just don't enclose the second IF in quotes.

{xen:if '{$value} == 1', 'X',{xen:if '{$value} == 2','XX','XXX'}}
 
Top