0 votes
by (120 points)
Currently I have this:

<<set $var = 1>>

<<if $var == 1> description

<elseif $var == 2> description

<</if>>

I am running through the passage, but I only get the number, not the description desired. I figure an array might work for this, but just would like to make sure there isn't an easier way. Something like this:

$var = (1,2,3,4) If $var = 1, then <<print desc>>, else $var = 2, then <<print desc>>, etc...?

Thanks.

1 Answer

0 votes
by (210 points)
You are missing some ">" and "<"symbols. This code worked for me:

<<set $var = 1>>
<<if $var == 1>> description1
<<elseif $var == 2>> description2
<</if>>
...