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

Arrange sidebar modules

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" />