Ger*_*oer 3 magento magento-1.7
我在互联网上看到了很多解决方案,但考虑到Magento的向上兼容性,它们似乎都不完整.
我想从footer_links参考中删除"热门搜索字词"和"高级搜索"链接.
由于我希望我的网站准备升级,我想通过local.xml执行此操作,而不是将catalogsearch.xml复制到本地版本,因为我认为这不是向上兼容的.我已经看到了相关的.phtml文件的一些变化,但我也相信这不是解决这个问题的正确方法,应该可以通过local.xml吗?
catalogsearch.xml中的块中没有"name"属性,如下所示:
<reference name="footer_links">
<action method="addLink" translate="label title" module="catalogsearch" ifconfig="catalog/seo/search_terms">
<label>Search Terms</label>
<url helper="catalogsearch/getSearchTermUrl" />
<title>Search Terms</title>
</action>
<action method="addLink" translate="label title" module="catalogsearch">
<label>Advanced Search</label>
<url helper="catalogsearch/getAdvancedSearchUrl" />
<title>Advanced Search</title>
</action>
</reference>
Run Code Online (Sandbox Code Playgroud)
我该怎么解决这个问题?
编辑:同样计算页脚中的"站点地图"链接.
您好这个代码放在您的主题local.xml文件中,别忘了删除缓存.这在CE 1.7.0.2中进行了测试
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="footer_links">
<!-- Remove 'Site Map' -->
<action method="removeLinkByUrl"><url helper="catalog/map/getCategoryUrl" /></action>
<!-- Remove 'Search Terms' Link -->
<action method="removeLinkByUrl"><url helper="catalogsearch/getSearchTermUrl" /></action>
<!-- Remove 'Advanced Search' -->
<action method="removeLinkByUrl"><url helper="catalogsearch/getAdvancedSearchUrl" /></action>
</reference>
</default>
</layout>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8413 次 |
最近记录: |