1. 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.....

Discussion in 'Styling and Customization Questions' started by Marcel, Oct 29, 2013.

  1. Marcel

    Marcel Active Member

    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.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Just use !forum_list.

    More specifically, <xen:if is="{$contentTemplate} != 'forum_list'">
     
  3. Marcel

    Marcel Active Member

    Damn, why didn't I find that? Silly me :)

    Cheers!
     

Share This Page