3

I've seen many solutions for this on the internet, but none of them seems to be complete, considering upward compatibility in Magento.

I'd like to remove the "Popular search terms" and "Advanced search" links from the footer_links reference.

Since I want my site to be ready for upgrades, I want to do this through local.xml, not by duplicating catalogsearch.xml to a local version, since I believe this is not upward compatible. I have seen some changes for the associated .phtml files, but I also believe this is not the right way to tackle this, it should be possible through local.xml right?

There's no "name" attribute in the blocks in catalogsearch.xml, like here:

    <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>

How should I fix this?

EDIT: same counts for the "Site map" link in the footer.

Gerard Nijboer
  • 502
  • 1
  • 7
  • 18

2 Answers2

5

Hi place this code in your themes local.xml file and dont forget to remove cache. This is tested in 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>
Palanikumar
  • 1,706
  • 5
  • 28
  • 51
-1

Search for in all xml files inside the layout folder:

app/design/frontend/THEME/NAME/layout/*.xml

You will see there's multiple files using the XML to add linkd to the footer link block. you can simply comment out the addLink tags as required

<!--
<action method="addLink" translate="label" module="tag">
        <name>tags</name><path>tag/customer/</path><label>My Tags</label>
</action>
-->
Andrew
  • 12,617
  • 1
  • 34
  • 48