magento separate stylesheet per parent category
What I want to do is setup a stylesheet each of my parent categories...
So in cat开发者_开发技巧egory -> custom design -> Custom Layout Update can I do some xml to call a styleheet?
If so how? If not, any other ideas.
Cheers
Shane
Just worked it out
<reference name="head">
<action method="addCss">
<stylesheet>yourtheme/css/red.css</stylesheet>
<params>media="screen"</params>
</action>
</reference>
Awesome!
Im not completely sure how magento handles XML files. But i have a XML rule file that calls rules from other xml files, you might be able to use something similar. I've tweeked it:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE deliverance [
<!ENTITY somecss SYSTEM "somecss.css">
<!ENTITY othercss SYSTEM "othercss.css">
<!ENTITY alexthomas SYSTEM "alexthomas.css">
]>
<css>
&somecss;
&othercss;
&alexthomas;
</css>
Hope this helps.
精彩评论