cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Site Map Title

SOLVED
   Did you know you can see the translated content as per your choice?

Changing Site Map Title

Hi, Thanks in advance for any help.

Im trying to change the title of my website site map to remove a duplicate title. Ive located the themes catalog.xml file and found the relevant section of code (i think). However, it seems the developers already edited how it fetches a title so im a little unsure how to impliment a title change. Below is the section of code relating to the sitemap in catalog.xml.

Could somebody please tell me where and what code to insert to do this? The insturctions i followed ended up in making my whole site not load (thankgod for back-ups).

<!--
SEO Site Map
-->
<catalog_seo_sitemap>
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="page/template_container" name="seo.sitemap.container" template="catalog/seo/sitemap/container.phtml">
<block type="page/template_links" name="seo.sitemap.links" as="links" template="page/template/links.phtml"/>
<block type="page/html_pager" name="seo.sitemap.pager.top" as="pager_top" template="page/html/pager.phtml"/>
<block type="page/html_pager" name="seo.sitemap.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
</block>
</reference>
</catalog_seo_sitemap>
<catalog_seo_sitemap_category>
<update handle="catalog_seo_sitemap" />
<reference name="seo.sitemap.container">
<action method="setTitle" translate="title" module="catalog"><title>Categories</title></action>
<block type="catalog/seo_sitemap_category" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
<action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
<action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
<action method="setItemsTitle" translate="title" module="catalog"><title>categories</title></action>
</block>
</reference>
<reference name="seo.sitemap.links">
<action method="addLink" translate="label title" module="catalog"><label>Products Sitemap</label><url helper="catalog/map/getProductUrl"/><title>Products Sitemap</title></action>
</reference>
</catalog_seo_sitemap_category>
<catalog_seo_sitemap_product>
<update handle="catalog_seo_sitemap" />
<reference name="seo.sitemap.container">
<action method="setTitle" translate="title" module="catalog"><title>Products</title></action>
<block type="catalog/seo_sitemap_product" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
<action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
<action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
<action method="setItemsTitle" translate="title" module="catalog"><title>products</title></action>
</block>
</reference>
<reference name="seo.sitemap.links">
<action method="addLink" translate="label title" module="catalog"><label>Categories Sitemap</label><url helper="catalog/map/getCategoryUrl"/><title>Categories Sitemap</title></action>
</reference>
</catalog_seo_sitemap_product>
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Changing Site Map Title

    <catalog_seo_sitemap_product translate="label">
        <label>Catalog Seo Sitemap (Product List)</label>
        <reference name="head">
            <action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
        </reference>
        <update handle="catalog_seo_sitemap" />
        <reference name="seo.sitemap.container">
            <action method="setTitle" translate="title" module="catalog"><title>Products</title></action>
            <block type="catalog/seo_sitemap_product" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
                <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
                <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
                <action method="setItemsTitle" translate="title" module="catalog"><title>products</title></action>
            </block>
        </reference>
        <reference name="seo.sitemap.links">
            <action method="addLink" translate="label title" module="catalog"><label>Categories Sitemap</label><url helper="catalog/map/getCategoryUrl"/><title>Categories Sitemap</title></action>
        </reference>
    </catalog_seo_sitemap_product>

this is the default layout in frontend/base/default/layout/catalog.xml

you would want to insert it between <catalog_seo_sitemap_product> and <update handle="catalog_seo_sitemap" />

View solution in original post

4 REPLIES 4

Re: Changing Site Map Title

add this

        <reference name="head">
            <action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
        </reference>

to each sitemap layout handler like catalog_seo_sitemap_category, catalog_seo_sitemap_product. they are in the default layout xml, not sure why you don't have it in your layout.

Re: Changing Site Map Title

The previous instruction i followed told me to add that also, which I did and caused the error. Im presuming it was me inserting it into the wrong location. Could you point to the exact place to insert it please?

I know its simple but im an idiot lol.

Thank you for the help

Re: Changing Site Map Title

    <catalog_seo_sitemap_product translate="label">
        <label>Catalog Seo Sitemap (Product List)</label>
        <reference name="head">
            <action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
        </reference>
        <update handle="catalog_seo_sitemap" />
        <reference name="seo.sitemap.container">
            <action method="setTitle" translate="title" module="catalog"><title>Products</title></action>
            <block type="catalog/seo_sitemap_product" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
                <action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
                <action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
                <action method="setItemsTitle" translate="title" module="catalog"><title>products</title></action>
            </block>
        </reference>
        <reference name="seo.sitemap.links">
            <action method="addLink" translate="label title" module="catalog"><label>Categories Sitemap</label><url helper="catalog/map/getCategoryUrl"/><title>Categories Sitemap</title></action>
        </reference>
    </catalog_seo_sitemap_product>

this is the default layout in frontend/base/default/layout/catalog.xml

you would want to insert it between <catalog_seo_sitemap_product> and <update handle="catalog_seo_sitemap" />

Re: Changing Site Map Title

Brilliant, just done it and it worked a charm.

As expected, it was me putting it into the wrong place.

Thanks very much