XF 2.0 Conditional statement not working

shyam123

Member
Hi,

I'm trying to get at conditional statement to work. But it's not working at the moment. Here is the code:

PHP:
<xf:if is="$template == 'thread_view'">
   Show content..
</xf:if>

As mentioned in this link https://xenforo.com/community/resources/conditional-statements-for-xenforo-2.5795/ this code is to display the code only on threads. But when I tested it, its not working, the code is not showing in the thread view.

I tested another code

PHP:
<xf:if is="$template !='thread_view'">
    Hide content..
</xf:if>

This condition to hide the code in thread view. But still code is showing in thread view.
 
Anyone figure this out? I'm trying to display an ad ONLY during thread view:

<xf:if is="$template == 'thread_view'">
AD HERE
</xf:if>

Doesn't work. Any help would be awesome.
 
Top Bottom