XF 1.5 Template Syntax Error?

Gossamer

Active member
Hello! I'm currently working on adding a new bbcode to my forum. I'm using a template for it, but I keep getting a syntax error. I'm not sure where I've gone wrong.

HTML:
<xen:foreach loop="$options" value="$option">
    <xen:if is="{$option} == nb">
        <xen:set var="$nb">True</xen:set>
    <xen:else>
        <xen:set var="$num">{$option}</xen:set>
    </xen:if>
</xen:foreach>

<div class="themeBox{$num} <xen:if is='{$nb} == True'>nb</xen:if>">
    {xen:raw $content}
</div>
 
There may be an additional issue, because using <xen:if> inside an attribute like that may not actually work (actually not sure).

But the most likely syntax issue right now is that:
HTML:
<xen:else>
Should be:
HTML:
<xen:else />
 
Top Bottom