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?
Sometimes, there is a need to remove some CSS and JS from a page as there may be conflictions between the theme and module CSS and JS. In order to remove CSS and JS from a page, <remove> tag is used in layout XML under the <head> tag.
In the Magento application, the recommended way to include stylesheets is to specify them in layout files. Usually, the stylesheets you include should be available for all store pages. To achieve this, include your CSS in default_head_blocks.
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>
Try skin_css:
<action method="removeItem"><type>skin_css</type><name>css/local.css</name></action>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With