Separate magento stylesheet per parent category

What I want to do is set up a stylesheet for each of my parent categories ...

So, in the category -> custom design -> Custom layout setup Can I do some xml to call the stylesheet?

If so, how? If not, any other ideas.

Greetings

Shane

+2
source share
2 answers

Just worked

<reference name="head"> <action method="addCss"> <stylesheet>yourtheme/css/red.css</stylesheet> <params>media="screen"</params> </action> </reference> 

Awesome!

+3
source

I'm not quite sure how magento handles XML files. But I have an XML rule file that calls rules from other XML files, you can use something like this. I tweeked this:

 <?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.

-one
source

All Articles