Magento - 如何删除 "addLinkRel"
Magento - how to remove "addLinkRel"
我创建了一个子主题,'rwd' 作为父主题。父主题在 page.xml 中的 'head' 块中有此代码:
<action method="addLinkRel"><rel>stylesheet</rel><href>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</href></action>
有没有办法在 local.xml 的子主题中删除它?
这不是很明显,但很容易。
<action method="removeItem"><type>link_rel</type><href>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</href></action>
将此代码添加到您的 local.xml
文件中
<default>
<reference name="head">
<action method="removeItem"><type>link_rel</type><name>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</name></action>
</reference>
</default>
我创建了一个子主题,'rwd' 作为父主题。父主题在 page.xml 中的 'head' 块中有此代码:
<action method="addLinkRel"><rel>stylesheet</rel><href>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</href></action>
有没有办法在 local.xml 的子主题中删除它?
这不是很明显,但很容易。
<action method="removeItem"><type>link_rel</type><href>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</href></action>
将此代码添加到您的 local.xml
文件中
<default>
<reference name="head">
<action method="removeItem"><type>link_rel</type><name>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</name></action>
</reference>
</default>