27

Hi i added this to catalog.xml layout definition:

<reference name="head">
    <action method="addCss"><stylesheet>css/local.css</stylesheet></action>
</reference>

and this to inside the same file:

<action method="removeItem"><type>css</type><name>css/local.css</name></action>

But it doesn't remove the css from that view. It is possible, that its not the right markup to achieve this. But have no idea. Anyone can help out?

zsitro
  • 1,812
  • 3
  • 24
  • 34

2 Answers2

77

Here is how to remove all the different CSS and JS in skin or js folder

<reference name="head">
    <!-- For a JS in the js folder -->
    <action method="removeItem"><type>js</type><name>functions.js</name></action>
    <!-- For a JS in the skin folder -->
    <action method="removeItem"><type>skin_js</type><name>functions.js</name></action>
    <!-- For CSS in the skin folder -->
    <action method="removeItem"><type>skin_css</type><name>css/local.css</name></action>
    <!-- For CSS in the js folder -->
    <action method="removeItem"><type>js_css</type><name>local.css</name></action>
</reference>
Kalpesh
  • 5,635
  • 2
  • 23
  • 39
Shadoweb
  • 5,812
  • 1
  • 42
  • 55
42

Try skin_css:

<action method="removeItem"><type>skin_css</type><name>css/local.css</name></action>
Josh
  • 2,820
  • 23
  • 15