One template, many variations?

flamenco

Thanks for those ideas! 
It seems like PHP code and switch statements will be my friends.  I'm not an object-oriented genius like some of you out there, but I can easily handle this much coding.  :)

It's a bit more manual than the other system I use, but will work perfectly well, and I think this will cover most of what I need. 

To give you an idea of how the other system works, it's possible to set up, for example, and drop-down on a page which has a selection of colors, or a selection of banner images from a folder, either of which would be plugged into the CSS, and that sort of thing.  I'm thinking that this would be a large project to make something like this, though.  But maybe it will stimulate the imagination of some of our better coders here.  :)

Thanks again!

MODx, Wordpress, WB Developer

Bramus

i'm doing this with a "header" on one site, http://www.marcelissen.nl This is done by an inline stylesheet in the template index.php file with an if else statement.
if (PAGE_ID == 1) { .div {background: img(header.jpg)} }

for example.
BRAMUS Internet Services

marathoner

If you simply want a way to style any given page (or the child pages of a given menu root parent) different than the default style you could use one of the two approaches in:
https://forum.WebsiteBaker.org/index.php/topic,10249.0.html

flamenco

Hi All,
In the past I've been asked to work mainly with one template, but have many variations. 

For instance, a template might be used throughout a site, but might use different colors on each page, maybe the background color or even just one DIV. 

Another example would be using a different banner image on each page. 

Another system I used had something called Template Variables which allowed this sort of thing very easily, along with many other types of content for each page.  It also supported inheritance, in the sense that if you picked, say, a background color for one page, all pictures underneath it would inherit that color unless you did an override for that page.

I hope that made sense.  I'm enjoying learning about show_menu and version 2 as well, but I haven't yet found a way to do what I'm describing. 

Do any of you know of ways to do something like this?  It would certainly be easier than making 12 very similar versions of the same template, for instance.

As always,
Thanks very much!
MODx, Wordpress, WB Developer