PDA

View Full Version : adding sidebar code to every single template--an easier way?


doob
12-07-2009, 06:25 PM
Hi all.

I am adding sidebar code to a new custom template. I started by getting it working in the FORUMHOME template, then added the code to the FORUMDISPLAY template. It looks like I'm going to have to customize each of the templates where I want the sidebar to show up (posts, contact us, sendmessage, etc.).

Am I going about this the wrong way? Is there a more global approach to adding this? Is there a better way to make sure I have code consistancy than editing each template individually to inject the code I need?

Thanks!
Doob

tipoboy
12-07-2009, 08:55 PM
are you wanting this sidebar added to every page, most pages or just a select few?

there are a few ways to do it but it would entirely depend on the application of the sidebar

- dave :D

doob
12-07-2009, 09:07 PM
For right now I want the sidebar added to every page except for album picture pages so that those pages have the maximum amount of space to display full size images.

I may want to control the content of the sidebar differently on a per-forum basis, but image I could use an if then statement to control that by querrying the forum id.

-D

tipoboy
12-07-2009, 10:04 PM
what code are you using to add the sidebar?

is it a modification here?

doob
12-09-2009, 03:50 AM
No. I'm just reusing code from the template I use on standard php pages for the rest of the site. Basically divs with a simple 2 column layout. I'm able to reuse the css nicely. I am running into a problem with the showthread template though, however forumhome and forumdisplay have worked out well.

You can see the sidebar in action in the forumhome template here: www.travelers411.com

-Doob

--------------- Added 1260337885 at 1260337885 ---------------

I'm actually a little leary of using mods as I'm still learning the basics and don't want the site to "get away from me". Especially since it seams like mods are very picky about what install version people are using and there isn't much support. Am I wrong in this feeling?