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

Arrange sidebar modules

Discussion in 'XenForo Questions and Support' started by smsmasters, Mar 31, 2011.

  1. smsmasters

    smsmasters Active Member

    What is the easiest way to arrange and add sidebar modules?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You will need to manually edit the appropriate templates.
    smsmasters likes this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Here is a guide to add a sidebar to any page:


    The index page already has a sidebar. See this template:

    Admin CP -> Appearance -> Templates -> forum_list

    You will see the different sidebar modules in order in the template:

    	<xen:edithint template="sidebar.css" />
    	<xen:hook name="forum_list_sidebar">
    		<xen:include template="sidebar_online_users" />
    		<!-- block: forum_stats -->
    		<div class="section">
    			<div class="secondaryContent statsList" id="boardStats">
    				<h3>{xen:phrase forum_statistics}</h3>
    				<div class="pairsJustified">
    					<dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
    						<dd>{xen:number $boardTotals.discussions}</dd></dl>
    					<dl class="messageCount"><dt>{xen:phrase messages}:</dt>
    						<dd>{xen:number $boardTotals.messages}</dd></dl>
    					<dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
    						<dd>{xen:number $boardTotals.users}</dd></dl>
    					<dl><dt>{xen:phrase latest_member}:</dt>
    						<dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
    					<!-- slot: forum_stats_extra -->
    		<!-- end block: forum_stats -->
    		<xen:include template="sidebar_share_page">
    			<xen:set var="$url">{xen:link canonical:index}</xen:set>
    For example, you can move the list of online users by moving this code within the above code:

    <xen:include template="sidebar_online_users" />
    smsmasters likes this.

Share This Page