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

Ads Between Category Nodes on the Forum Index

Discussion in 'Styling and Customization Questions' started by fattony69, Oct 2, 2012.

  1. fattony69

    fattony69 Well-Known Member

    I am trying to put ads between category nodes on my site. Essentially I want to do this, but I am not sure how to do it.

    [​IMG]
     
  2. Arty

    Arty Well-Known Member

    First you need to wrap forums list in a div and before it add another div for left side. In forum_list.html find
    Code:
        <xen:if is="{$renderedNodes}"><xen:include template="node_list" /></xen:if>
    
    and replace with something like this
    Code:
        <xen:if is="{$renderedNodes}">
            <div class="websiteLeft">
                Your ad code here!
            </div>
            <div class="websiteMiddle">
                <xen:include template="node_list" />
                <div style="linkUnit"> Your link unit here! </div>
            </div>
        </xen:if>
    
    and add CSS entries for it:
    Code:
    .websiteLeft
    {
        float: left;
        width: 160px;
    }
    
    .websiteMiddle
    {
        margin-left: 170px;
    }
     
    .linkUnit
    {
        margin: 5px auto;
        width: 468px;
    }
     
    .websiteMiddle:after
    {
        content: '';
        display: block;
        clear: both;
    }
    
    
    That should take care of left side bar.

    To add ads before categories, edit template note_category_level_1.html. At the end of file add something like this:
    Code:
    <li class="noteAds">
      Ad Unit Here!
    </li>
    and add css for it like this:
    Code:
    .nodeAds
    {
        margin: 5px auto;
        width: 728px;
    }
    
    Add all that CSS for to EXTRA.css template
     
    Lnqtm, fattony69 and Brandon Sheley like this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  4. fattony69

    fattony69 Well-Known Member

Share This Page