开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜