我已经将一个新的Magento 1.5.0.1安装更新到Magento 1.6.0.0,现在我在页脚中有一个链接,"订单和退货",我无法想象(尚未)如何删除它.
我无法从核心文件中删除它,我已经尝试过XML方法,但似乎没有用(可能是我的错).
目前我甚至无法本地化链接生成的位置,因为简单的测试(如输出应该出现的随机单词)永远不会起作用.
有人有任何建议或解决方案吗?
Lee*_*ite 14
你可以尝试:
<layout>
<default>
<reference name="return_link">
<!-- Set the template file to an empty string to prevent output -->
<action method="setTemplate">
<template></template>
</action>
</reference>
</default>
</layout>
Run Code Online (Sandbox Code Playgroud)
或者在1.7+:
<layout>
<default>
<reference name="footer_links">
<action method="removeLinkBlock">
<blockName>return_link</blockName>
</action>
</reference>
</default>
</layout>
Run Code Online (Sandbox Code Playgroud)
或者,如Rumble所述:
<layout>
<default>
<remove name="return_link" />
</default>
</layout>
Run Code Online (Sandbox Code Playgroud)
关于使用remove元素的一个警告是,它会阻止在布局中的任何位置使用该块名称,因为它将转换为全局xpath选择器.
这里的解决方案.
由于我需要保持主题相关,我将布局sales.xml从app/design/frontend/base/default/layout /复制到我的主题布局文件夹(app/design/frontend/default/<name>/layout /)并注释掉<action>以下代码段中的元素:
<default>
<reference name="footer_links">
<block type="sales/guest_links" name="return_link"/>
<action method="addLinkBlock"><blockName>return_link</blockName></action>
</reference>
</default>
Run Code Online (Sandbox Code Playgroud)
请享用!
| 归档时间: |
|
| 查看次数: |
19926 次 |
| 最近记录: |