Magento从特定视图中删除css或js
您好,我已将此添加到catalog.xml布局定义中:Magento从特定视图中删除css或js,css,magento,layout,add,Css,Magento,Layout,Add,您好,我已将此添加到catalog.xml布局定义中: <reference name="head"> <action method="addCss"><stylesheet>css/local.css</stylesheet></action> </reference> css/local.css 并将其保存到同一文件中: <action method="removeItem"><type&
<reference name="head">
<action method="addCss"><stylesheet>css/local.css</stylesheet></action>
</reference>
css/local.css
并将其保存到同一文件中:
<action method="removeItem"><type>css</type><name>css/local.css</name></action>
csscss/local.css
但它不会从该视图中删除css。这可能不是实现这一目标的正确标记。但是我不知道。有人可以帮忙吗?试试skin\u css:
<action method="removeItem"><type>skin_css</type><name>css/local.css</name></action>
skin\u csscss/local.css
以下是如何删除皮肤或JS文件夹中所有不同的CSS和JS
<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>
jsfunctions.js
skin_jsfunctions.js
skin_csscss/local.css
js_csslocal.css
您是否制作了舒尔,您的catalog.xml或某些句柄没有被另一个扩展覆盖?很好地解决了运营问题之外的问题,帮助了谷歌同行。谢谢@Benjam!Magento很难,部分答案也没有多大帮助。