Magento是否从所有主题中删除原型?
我试图从magento中删除原型和其他默认js垃圾 使用此选项可用于cms页面和主页:Magento是否从所有主题中删除原型?,magento,themes,prototype,Magento,Themes,Prototype,我试图从magento中删除原型和其他默认js垃圾 使用此选项可用于cms页面和主页: <?xml version="1.0"?> <layout version="0.1.0"> <cms_page> <reference name="root"> <reference name="head"> <action method="removeItem"
<?xml version="1.0"?>
<layout version="0.1.0">
<cms_page>
<reference name="root">
<reference name="head">
<action method="removeItem"><type>js</type><name>prototype/prototype.js</name></action>
<action method="removeItem"><type>js</type><name>lib/ccard.js</name></action>
<action method="removeItem"><type>js</type><name>prototype/validation.js</name></action>
<action method="removeItem"><type>js</type><name>scriptaculous/builder.js</name></action>
<action method="removeItem"><type>js</type><name>scriptaculous/effects.js</name></action>
<action method="removeItem"><type>js</type><name>scriptaculous/dragdrop.js</name></action>
<action method="removeItem"><type>js</type><name>scriptaculous/controls.js</name></action>
<action method="removeItem"><type>js</type><name>scriptaculous/slider.js</name></action>
<action method="removeItem"><type>js</type><name>varien/js.js</name></action>
<action method="removeItem"><type>js</type><name>varien/form.js</name></action>
<action method="removeItem"><type>js</type><name>varien/menu.js</name></action>
<action method="removeItem"><type>js</type><name>mage/translate.js</name></action>
</reference>
</reference>
</cms_page>
</layout>
jsprototype/prototype.js
jslib/ccard.js
jsprototype/validation.js
jsscriptaculous/builder.js
jsscriptaculous/effects.js
jsscriptaculous/dragdrop.js
jsscriptaculous/controls.js
jsscriptaculous/slider.js
jsvarien/js.js
jsvarien/form.js
jsvarien/menu.js
jsmage/translate.js
但是如何使这个模板更宽呢?因此,这些js将不再出现在主题中?默认原型位置为:
app/design/frontend/package/theme/layout/page.xml
包含以下内容的行:
<action method="addJs"><script>prototype/prototype.js</script></action>
prototype/prototype.js
在您使用的package/theme文件夹中,请注释掉这一行或删除它并刷新缓存
请注意,如果没有原型,单页签出将被破坏。我注意到,是否有一个使用Jquery的单页签出的文档解决方案?我们使用Jquery实现了一个完全定制的签出。是否可以共享您的解决方案?同样的问题是,我对折扣代码有问题。在Magento中似乎使用了很多原型。也试着解决这个问题。Magento确实是一个清理和定制的工具。最好不要使用magento,但对于这个项目来说,这是非常必要的。不幸的是,实现的解决方案是100个工时的编码时间和100个文件来取代普通的签出。我建议购买一个商业jquery单页签出/多页签出解决方案。类似这样的事情(我没有附属关系)