Setting a TRUE and FALSE Value

TazDevilLooney

Active member
Code for dummies! ;)

I'm trying to get this peice of code to work but cant get the template to save without an error.

I wish to set a NEW value to TRUE and use in a <xen:if> This is what i got...

<xen:set var="$myvar">true</xen:set>
<xen:if {$myvar}="true">
This is true!
<xen:else />
This is False!
<xen:if>

Something so simple but can't understand why.
confused.png
 
I was assuming that was pseudocode, as the <xen:if> is syntatically wrong. This will suffice:

<xen:if is="{$myvar}">
 
Oh lovely jubbley, thankyou so much mike.

final code if anyone else wants it

1 = True
0 = False

<xen:set var="$myvar">1</xen:set>
<xen:if is="{$myvar}">
This is True
<xen:else />
This is Fause
</xen:if>

Nice one :)
 
Top Bottom