• 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

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

Brogan

XenForo moderator
Staff member
#4
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
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'">