XF 2.1 Conditional statement not working

C Allingham

Member
Trying to use this conditional statement in an advertisement in Container content: Above on my forum list page. I'm guessing you can't use these xf statements in an ad?

<xf:if is="$template == 'forum_list'">
Show test content...
</xf:if>

The page in question is https://tvwbb.com. My homepage is the forum list page.
 
Last edited:
Try this out instead:

Code:
<xf:if is="$xf.reply.template == 'forum_list'">
ad code here
</xf:if>
This was helpful, what about excluding specific forums/nodes? The following does not seem to work:
Code:
<xf:if is="!in_array($forum.node_id, [1,2,3])">
 
Top Bottom