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

XF 1.1 ad_below_top_breadcrumb

Morgain

Well-known member
#1
How can I make a conditional so some stuff I put in ad_below_top_breadcrumb ONLY appears on the main forum page - the standard landing page?
@tenants I noticed you playing with this when I searched maybe you can advise? or anyone else ... ?
 

Brogan

XenForo moderator
Staff member
#2
<xen:if is="{$contentTemplate} == 'forum_list'">

http://xenforo.com/community/resources/conditional-statements.1604/

How can I find out which template to edit?
Using your browser, view the page source and look for a line of code near the top of the page which begins
<div id="content" class="; the class is the name of the template. So for the main forum page, the line of code is:
<div id="content" class="forum_list">, which makes the template forum_list.

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181112
 

Morgain

Well-known member
#3
@Brogan thank you - but I'm getting error on line2 which makes it that line of code so there's something I haven't understood. Your post seemed to show you'd put the forum_list part in the conditional so I didn't need to do anything except close the 'if'

Code:
<xen:hook name="ad_below_top_breadcrumb" />
<xen:if is="{$contentTemplate} == 'forum_list">
stuff
</xen:if>
 

CTXMedia

Formerly CyclingTribe
#4
Possibly a missing close quote - try:

'forum_list'"

Code:
<xen:hook name="ad_below_top_breadcrumb" />
<xen:if is="{$contentTemplate} == 'forum_list'">
stuff
</xen:if>
 

Morgain

Well-known member
#5
Thank you @Clickfinity.

Now I have one tiny opposite thing to do and I'm done.
The same graphic as I just put at the top of the forum_list also appears much smaller on my sidebar which is on most pages. Obviously I dont want this to duplicate on forum_list
On the sidebar which is my own include template, I tried this

Code:
<xen:if is="{$contentTemplate}!='forum_list'">
<img src="@imagePath/myschooltiny.gif" / ><br />
</xen:if>
with the exclamation mark to make it false.
But the small size graphic is still showing in the sidebar on the forum_list page.