Stylesheet

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Mircle

Stylesheet

Post by Mircle »

Ok heres one that I think would be easier than some of the other questions Ive asked! (hopefully)

I have a site that all pages use the same template...., however, in order to change various things on each page I have some small stylesheet changes which change for instance the banner picture or the background image. So the site operates from a global stylesheet then I use a small stylesheet for each page to over ride previous rules. Nothing new here as far as web design goes but I cannot for the life of me see how to do this in CMSMS.

Any assistance is much appreciated
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Stylesheet

Post by Elijah Lofgren »

I think you're wanting to apply stylesheets to individual pages.
You can do this by putting this kind of code in the "Metadata:" text box while editing a page (see the "Options" tab).

Code: Select all

<style type="text/css">
body {background-color:red;}
</style>
Or you could link to a file link this:

Code: Select all

<link rel="stylesheet" type="text/css" href="http://forum.cmsmadesimple.org/Themes/cmsnew/style.css" />
Or you could link to a specific stylesheet that you have added to CMSMS (I'm unsure on this one, I'd need to double-check.):

Code: Select all

<link rel="stylesheet" type="text/css" href="http://www.cmsmadesimple.org/stylesheet.php?name=stylesheet_name" />
Hope this helps,

Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Mircle

Re: Stylesheet

Post by Mircle »

Elijah,

Thanks for your reply!

It is option 2 that you have suggested that is what I would like to be able to do. So my question is HOW DO I DO THIS? It is already linked to the global stylesheet via the template so where do I tell CMSMS that another stylesheet awaits this page?

Cheers

Addendum:

After mulling over your answer and confirming with my wife that I am quite thick, I have come to the conclusion that you have well and truly answered my question....Ive used the first option and it works fine, I couldnt get the links right for the second option for some reason! Id love to knwo how to do it the third way if you get around to looking at it!
So thanks heaps, its all coming along nicely now..I love this CMS!
Last edited by Mircle on Mon Dec 25, 2006 9:00 am, edited 1 time in total.
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Stylesheet

Post by Elijah Lofgren »

Mircle wrote: After mulling over your answer and confirming with my wife that I am quite thick, I have come to the conclusion that you have well and truly answered my question....Ive used the first option and it works fine, I couldnt get the links right for the second option for some reason! Id love to knwo how to do it the third way if you get around to looking at it!
So thanks heaps, its all coming along nicely now..I love this CMS!
I just checked and with the third way you just use a link like this if your stylesheet was named "Print":

Code: Select all

<link rel="stylesheet" type="text/css" href="http://cmsmadesimple.localhost/stylesheet.php?name=Print" />
Hope this helps,

Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Locked

Return to “CMSMS Core”