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

Conditional to not show ad on index page

Discussion in 'Styling and Customization Questions' started by Blue, Jul 6, 2012.

  1. Blue

    Blue Well-Known Member

    How do I use this to not show on the index page and to show on all other pages in ad_above_top_breadcrumb?

    How can I show content on a specific page?
    <xen:if is="{$contentTemplate} == 'xyz'">
    This content will show on the xyz template
    </xen:if>
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Code:
    <xen:if is="{$contentTemplate} != 'forum_list'">
    
    </xen:if>
    
     
    Blue likes this.
  3. Blue

    Blue Well-Known Member

    So the opposite, to show only on the forum list page would be
    Code:
    <xen:if is="{$contentTemplate} = 'forum_list'">
     
    </xen:if>
    One step further, I want to show different ads for each code. I guess that would require an OR. I'm not quite sure how to do that properly.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Double ==

    Different ads for each node? What is the condition?
     
  5. Blue

    Blue Well-Known Member

    I want to have certain ads on the forum home page, and different ad code for the topics and post pages in the ad_above_top_breadcrumb template.
     
  6. Blue

    Blue Well-Known Member

    If forum list this, or else this.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Code:
    <xen:if is="{$contentTemplate} == 'forum_list'">
    
    </xen:if>
    
    <xen:if is="{$contentTemplate} == 'forum_view'">
    
    </xen:if>
    
    <xen:if is="{$contentTemplate} == 'thread_view'">
    
    </xen:if>
    
     
    jeffwidman, Bram and Blue like this.
  8. Blue

    Blue Well-Known Member

    Perfect, thank you!
     

Share This Page