Theme's per page instead of templates
Hi All,
We have a requirement where a client would like to have different colours displayed on a page depending on the area that they are in, i.e. the banner should be a certain colour along with the download lists, news items etc.
Usually I would create a template and theme per area to get around this however there are potentially 32 colours that they would want to use. Has anyone come across this requirement before? I thought about having some logic to detect the area they are in and then apply the appropriate css however I would prefer not to hard code anything, also the area names could change.
Ideally I would like to select a theme per page like you do when you select a theme for a template.
Any suggestions/idea's would be most welcome.
Thanks
Richard
I coded this into the template directly, just a css class on the body which I can hook into with css to change the colors. Keeps us on 1 theme... I mean clearly it requires a specific set of rules.
Our rule method just checks the URL (keeps the DB calls to 0)
if startwith /ug
..green
else if startwith /pg
..red
else if startwith /pa
..purple
else
..blue
Thanks Steve, I think this is the route we will have to go down. I was worried about people modifying the page/area names and potentially causing issues but it seems the best way forward.
Nothing hardcoded either. I made a new config element in the backend that lets me define new rules on the fly...