gpt4 book ai didi

Magento 从页脚链接中删除 SEO 术语和高级搜索

转载 作者:行者123 更新时间:2023-12-02 17:20:46 25 4
gpt4 key购买 nike

我在互联网上看到了很多解决方案,但考虑到 Magento 的向上兼容性,它们似乎都不完整。

我想从 footer_links 引用中删除“热门搜索字词”和“高级搜索”链接。

由于我希望我的网站准备好升级,因此我想通过 local.xml 来完成此操作,而不是通过将 Catalogsearch.xml 复制到本地版本,因为我相信这不向上兼容。我已经看到相关 .phtml 文件的一些更改,但我也相信这不是解决此问题的正确方法,应该可以通过 local.xml 对吗?

catalogsearch.xml 中的 block 中没有“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>

我应该如何解决这个问题?

编辑:页脚中的“站点地图”链接也同样有效。

最佳答案

您好,将此代码放入您的主题 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>

关于Magento 从页脚链接中删除 SEO 术语和高级搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12397708/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com