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

XF 1.2 Template conditionals, if controllerName/Action.....

Marcel

Active member
#1
Trying to include a small template within the forum. At the moment I want to include it everywhere except the forum index / listing.

This is what I'm currently using

<xen:if is="{$controllerName} != 'XenForo_ControllerPublic_Index'
AND
{$controllerAction} != 'Index'">
<xen:include template='template' />
</xen:if>

However as you can probably tell, while it doesn't show up on the forum listing, it also doesn't show up on threads, the portal homepage, the gallery etc etc.

I thought this was the right controller and action to exclude, or have I not got the semantics of the statement correct?

Thanks.