Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento从特定视图中删除css或js_Css_Magento_Layout_Add - Fatal编程技术网

Magento从特定视图中删除css或js

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&

您好,我已将此添加到catalog.xml布局定义中:

<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很难,部分答案也没有多大帮助。