[SOLVED] Adding one stylesheet to some pages

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

[SOLVED] Adding one stylesheet to some pages

Post by frankmanl »

For some pages in a website I need an extra stylesheet. But that extra sheet interferes with all other pages.
The way I solved this is making two templates, one with and one without the extra stylesheet.
But I rather have it solved using just one template and e.g. an if-statement to load the extra stylesheet when needed.
Is that possible? How could I do that?

Frank
Last edited by frankmanl on Thu Nov 22, 2012 4:23 am, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: Adding one stylesheet to some pages

Post by Jos »

You can put a smarty tag in the "Page Specific Metadata" field of a page, like {cms_stylesheet name='myspecialstylesheet'}
User avatar
frankmanl
Power Poster
Power Poster
Posts: 425
Joined: Sat Jul 12, 2008 3:50 am

Re: Adding one stylesheet to some pages

Post by frankmanl »

Just what I looked for.
Thanks,

Frank
Post Reply

Return to “Layout and Design (CSS & HTML)”