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

template question for pages w/ the sidebar

Discussion in 'Styling and Customization Questions' started by Mutt, Jul 13, 2012.

  1. Mutt

    Mutt Well-Known Member

    the advertisements with template edits thread is closed so I guess I'll ask here. I have a 720x90 banner spot I put in "ad_below_top_breadcrumb" whihc works fine on most pages BUT when there's a sidebar it's too big & needs to be a 468x60. I handle it w/ a simple if / else listing all the pages that have a sidebar in the array.

    Code:
    <xen:if is="in_array({$contentTemplate}, array('forum_list','EWRmedio_Media','EWRmedio_MediaView','member_list','news_feed_page_global','conversation_view'))">
     
        <xen:comment>468 x 60 AD</xen:comment>
        --- 468 x 60 ad code --- 
     
    <xen:else />
     
        <xen:comment>728 x 90 AD</xen:comment>
        --- 728 x 90 ad code --- 
     
    </xen:if>
    problem is, I've missed a bunch. I notice them a little at a time. I'm going to go thru & look for more right now but my question is, is there a way to setup the if so it's just looking for if <xen:sidebar> exists? something like

    Code:
    <xen:if is="$sidebar">
     
        <xen:comment>468 x 60 AD</xen:comment>
        --- 468 x 60 ad code --- 
     
    <xen:else />
     
        <xen:comment>728 x 90 AD</xen:comment>
        --- 728 x 90 ad code --- 
     
    </xen:if>
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    <xen:if is="{$sidebar}">

    should work
     
  3. Mutt

    Mutt Well-Known Member

    you rock, that totally works!!!!
     
    Yorick likes this.

Share This Page