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

Using the template ad_sidebar_bottom

Discussion in 'XenForo Questions and Support' started by AndreaMarucci, Apr 28, 2011.

  1. AndreaMarucci

    AndreaMarucci Well-Known Member

    I would like to move some addons block at the end of the sidebar so my idea is just to use the template ad_sidebar_bottom and to put the include inside it.

    I've tried this
    Code:
    <xen:hook name="ad_sidebar_bottom" />
    
    <xen:include template="xen_tr_com_today_birthday" />
    <xen:include template="GP_donations" />
    <xen:include template="xen_tr_com_latest_users" />
    
    <!-- ::MOD:: blocco nella sidebar -->
    <div class="section">
        <div class="secondaryContent partenaire" id="partenaires">
            <h3>PubblicitĂ </h3>
              <div class="pairsJustified">
                <a href="http://www.shift.it" target="_blank"><img src="/styles/default/xenforo/bannershift.png" height="228" width="228" border="0"></a>
              </div>
        </div>
    </div>
    <!-- ::MOD:: fine blocco nella sidebar -->
    but doesn't work. The three lines
    Code:
    <xen:include template="xen_tr_com_today_birthday" />
    <xen:include template="GP_donations" />
    <xen:include template="xen_tr_com_latest_users" />
    are now in the forum_list template and they do work...

    Any suggestion on how the blocks does not display if I put these lines in that template?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Can't you just move the template includes to just above </xen:sidebar> in the forum_list template?
     
  3. AndreaMarucci

    AndreaMarucci Well-Known Member

    Hi Brogan, these lines are yet above the tag you mention

    Code:
        </xen:hook>
    <xen:include template="xen_tr_com_today_birthday" />
    <xen:include template="GP_donations" />
    <xen:include template="xen_tr_com_latest_users" />
    </xen:sidebar>
    I would like to move them in the ad_sidebar_bottom so they appear at the bottom of the sidebar. Now under these three blocks there is the [bd] Widget block and under that one there is a custom block you see in the first code. I've had the idea to put these lines in the ad_ template but I don't understand why these do not display anything...

    if you want to see http://forum.kog.it
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I've just tested adding some template includes to the ad_sidebar_bottom template and it works fine.
     
  5. AndreaMarucci

    AndreaMarucci Well-Known Member

    OMG. What else do I've to do other than copy these three lines and put them in the ad_sidebar_bottom template?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    All you have to do is the include.

    For example, I just moved the share page template from forum_list to ad_sidebar_bottom and it works fine.
    Code:
    <xen:include template="sidebar_share_page">
        <xen:set var="$url">{xen:link canonical:index}</xen:set>
    </xen:include>
    Are you sure you're working in the correct style?
     
  7. AndreaMarucci

    AndreaMarucci Well-Known Member

    Well I don't know why but these two

    <xen:include template="xen_tr_com_today_birthday" />
    <xen:include template="xen_tr_com_latest_users" />

    does not work if I put them in the ad_sidebar_bottom and this one

    <xen:include template="GP_donations" />

    work. Any idea why? I'll ask to the developer...
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    It would be best to ask in the add-on threads.

    I don't have those add-ons installed so can't do any testing.
     
  9. Mike

    Mike XenForo Developer Staff Member

    You can't move template includes from the "main" page to the "chrome" of the page if they require data exposed to the main page. The data they use is not available in the actual sidebar template, just during setup of the main page (forum_list, in this case).
     
    Brogan likes this.
  10. AndreaMarucci

    AndreaMarucci Well-Known Member

    Thanks Mike. I don't have fully understood what do you mean but I imagine that for the blocks that display some sort of dynamic data that operation is not possible... Thanks!
     
  11. ragtek

    ragtek Guest

  12. AndreaMarucci

    AndreaMarucci Well-Known Member

  13. ragtek

    ragtek Guest

  14. AndreaMarucci

    AndreaMarucci Well-Known Member

    Fantastic. I'll wait for this...
     

Share This Page