• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Phrase names and variables

katsulynx

Well-known member
#1
Code:
<xen:foreach loop="$text.link_tags" value="$tag" i="$i">
   <xen:if is="{$tag} == 1">
         <div class="tag tag_{$tag}">
             {xen:phrase Phrase_Tag{$tag}}
         </div>
   </xen:if>
</xen:foreach>
Is there a way to get the code snippet above working and call a different phrase each time it cycles through the loop or would I have to go the long way using a dumb if-elseif repeat queue? Shortly spoken this should call "Phrase_1", "Phrase_2", etc.
 

katsulynx

Well-known member
#3
Ye, that was actually my mistake there, I wanted to use $i instead of $tag in the variable name. Seems like i have to go the ugly way then.