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

XF 1.4 Conditional Statement for home page

Discussion in 'Styling and Customization Questions' started by OrlandoTiger, Feb 4, 2015.

  1. OrlandoTiger

    OrlandoTiger Member

    What's the conditional statement to show something only on the home page.

    I'm using these for the threads. <xen:elseif is="{$forum.node_id} == 12" />

    I just need to know what to use for the home page.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. OrlandoTiger

    OrlandoTiger Member

    Thanks but I'm not looking for the template. I have a list of <xen:if > statements that I am using to show targeted ads within the "ad_" templates.

    I've tried this but no luck
    <xen:elseif is="{$forum.node_id} == 'index'" />

    This seems to work but it's also doing it on every page that's not associated with a forum, like "watched threads.
    <xen:elseif is="{$forum.node_id} == 0" />

    thanks
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You need the template name to know how to target it in the conditional statement.

    The guide in my signature explains how to do that.
     
  5. OrlandoTiger

    OrlandoTiger Member

    I swear I must be missing something.

    I've tried both of these with no luck. I've read through the entire conditionals page.

    <xen:elseif is="{$forum.node_id} == 'forum_list'" />
    <xen:elseif is="{$contentTemplate} == 'forum_list'">
     

Share This Page