badsey |
|
---|---|
Is it possible to use a different CSS for a different page for example
page.php?id=3 > Default css page.php?id=5 > Diffrent css page.php?id=1 > Another diffrent css |
GHengeveld |
|
---|---|
3 simple options:
- Put the page in a separate category and create a tpl file for the category (page.catname.tpl). Then insert CSS in the template. - Use javascript to overwrite the CSS for that specific page. - If you use HTML parsing in the page you can insert the CSS directly (can be external file). |
pieter |
|
---|---|
For my solution you need to make for those pages a alias.
Then you can use {PHP.al} to get the alias. Now you can load a CSS file with eg. link href="skins/sed-light/{PHP.al}.css" type="text/css" rel="stylesheet" /> You need to make for your example 3 CCS files alias1.css alias2.css alias3.css Don't forget to load the standard css to. Or make one CSS and make different classes for the differnt pages. Make as example alias1 class and you can use <div class={PHP.al}> Try if, maybe it is not working exactly. Maybe not the best way. Good luck ... can we help you ...
|
GHengeveld |
|
---|---|
That seems like a nice solution. You don't have to use {PHP.al}, you can use {PHP.id} also.
<!-- IF {PHP.id} == 1 AND {PHP.z} == 'page' -->
<link href="your/css/file.css" rel="stylesheet" type="text/css" />
<!-- ENDIF --> Best to put it in header.tpl with the others. Note that this isn't suitable if you want this applied to many pages. |
badsey |
|
---|---|
oh brill !!, will try that now,
i only need it for selected pages, just to show its a different part of the Charity site |