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

set sidebar to true with php bit

brstrm

Active member
#1
Hello all,

I'm working on a site design that aesthetically requires the presence of a sidebar on every page.

I am wondering if there is that would enable a global sidebar on every page. I've done a quick google and am unable to find any pre-existing plug-in..................................

EDIT: Changed my mind. Not interested in a plug-in. Now I am wondering if there exists a php bit which would allow me to set sidebar to true on all pages. It would be nice to be able to toggle this within the style properties as I could incorporate it into my own xenforo framework.
 
Last edited:

brstrm

Active member
#3
Changed my mind. Not interested in a plug-in. Now I am wondering if there exists a php bit which would allow me to set sidebar to true on all pages. It would be nice to be able to toggle this within the style properties as I could incorporate it into my own xenforo framework.
 

Jeremy

Well-known member
#4
Sidebars are added per page using the xen:sidebar tag. Supporting data is added in via PHP. You'll need to edit templates + create an add-on.
 

xf_phantom

Well-known member
#8
Sorry, i didn't notice that you're also talking about a global sidebar.
i've tried to add it too, but xenforo isn't designed to have a global sidebar:(

You can do it via the event system and use templatePostRender
PHP:
$containerData['sidebar'] = $template->create('my_global_sidebar'); )
but there are some problems..:/
See this post for more informations: http://xenforo.com/community/threads/global-sidebar.53928/#post-577822
 
Last edited:

Mike Creuzer

Well-known member
#9
The thread ends with you talking about PAGE_CONTAINER template. Did that end up working for you?

XenForo has a default sidebar. Staff Online Now, Online Now, Forum Statistics, etc. I just want to show that, all the time, and any other sidebars can overwrite that.
 

Jeremy

Well-known member
#10
The thread ends with you talking about PAGE_CONTAINER template. Did that end up working for you?

XenForo has a default sidebar. Staff Online Now, Online Now, Forum Statistics, etc. I just want to show that, all the time, and any other sidebars can overwrite that.
You'll need a plugin for that. Its added in via xen:sidebar and the data isn't fetched on each page.