Page 1 of 1

[SOLVED ]Stylesheet Issue

Posted: Thu Jan 12, 2012 11:49 am
by CapereSpiritum
Hi, I'm running CMSMS 1.10.2, php 5, mySQL 5

I'm in the process of converting a static site to CMSMS.

All the static pages have a body tag like this </__body class=home> which then leads to a background image that varies according to BODY.home #headerimage { with the .home varying according to the page and setting a different header BG image.

If I'm using a modified CMSMS template, can anyone suggest how to modify the style to do the same job without having to create 14 different templates that are otherwise the same?

Many thanks in advance.

Re: Stylesheet Issue

Posted: Thu Jan 12, 2012 12:00 pm
by KO
You can have:
</__body class="{$page_alias}">

This way all the pages have page alias printed which is unique. Just check that alias is for that page is what you want.

Re: Stylesheet Issue

Posted: Thu Jan 12, 2012 12:08 pm
by CapereSpiritum
Hi KO

That was quick... Brilliant.

Just to re-cap, let's assume the page is about Bass and the alias is 'bass', change the body tag as above and then the style to be BODY.bass #headerimage {

Seems pretty clear, just double checking :)

Many thanks...

Re: Stylesheet Issue

Posted: Thu Jan 12, 2012 12:13 pm
by KO
Correct ... or just simply .bass #headerimage {

Re: Stylesheet Issue

Posted: Thu Jan 12, 2012 12:16 pm
by CapereSpiritum
Fantastic, many thanks.

Easy when you know how... ;)

Cheers...

Re: Stylesheet Issue

Posted: Fri Jan 13, 2012 12:24 pm
by M@rtijn
So this one is solved?

Would you be so kind to add [solved] in front of the title of the first post, as per http://forum.cmsmadesimple.org/viewtopic.php?f=3&t=8692