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

Sidebar in all Forum

Brogan

XenForo moderator
Staff member
#2
This is how to add a sidebar to other templates.

How do I add a sidebar to other views or templates?
<xen:sidebar>
Sidebar content
</xen:sidebar>

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181112

You can't get the forum statistics and other data to show on other pages as the data is only exposed for the forum_list template.

(Thread moved from the template modifications forum.)
 

Morgain

Well-known member
#4
How do I add a sidebar to other views or templates?
<xen:sidebar>
Sidebar content
</xen:sidebar>

Great Brogan.
But which templates need it so as to appear on all forums? - and for me on Pages too.
 

Brogan

XenForo moderator
Staff member
#5
How can I find out which template to edit?
Using your browser, view the page source and look for a line of code near the top of the page which begins
<div id="content" class="; the class is the name of the template. So for the main forum page, the line of code is:
<div id="content" class="forum_list">, which makes the template forum_list.

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181037

So the forum_view template to add it to all forums.

For Pages you just add the code to each page template.
Or, add it to the pagenode_container template just below <div id="pageNodeContent">.
 

Morgain

Well-known member
#7
I am very happy with my sidebar. It's now on sidebar_online_users and category_view (dedicated cat page for each category)

I added a table between the code brackets that create the sidebar. This displays links to my main areas to act as a contents menu.
The table is in old fashioned html as I'm not any good at css. It looks OK at least for now.
But the little graphics for the categories don't display.

eg.
HTML:
<tr><td ><a href="http://www.housemorgain.co.uk/forumxf/styles/default/xenforo/widgets/cat-web2.png"></a>
<a href="http://www.housemorgain.co.uk/forumxf/index.php?categories/gossip-sphere.16/"><font color=#5b88fd  size=3><b>GOSSIP SPHERE</b></font></a><br />
</td></tr>
The title and its link display but not the graphic.