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

Discussion in 'Styling and Customization Questions' started by Morgain, Jul 27, 2013.

  1. Morgain

    Morgain Well-Known Member

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

    Brogan XenForo Moderator Staff Member

    <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
     
    Tracy Perry likes this.
  3. Morgain

    Morgain Well-Known Member

    @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>
     
  4. CyclingTribe

    CyclingTribe Well-Known Member

    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 likes this.
  5. Morgain

    Morgain Well-Known Member

    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.
     
  6. CyclingTribe

    CyclingTribe Well-Known Member

    Try:

    Code:
    <xen:if is="!{$contentTemplate} == 'forum_list'">
    <img src="@imagePath/myschooltiny.gif" / ><br />
    </xen:if>
    
     
    Morgain and MattW like this.

Share This Page