1

I am looking for a method to add custom page title and meta description to Magento defaults catalog/seo_sitemap/category/ & catalog/seo_sitemap/product/ pages.

I have done this before on the built-in contacts page by updating the contacts.xml file with:

    <reference name="head">     
        <action method="setDescription"><title>my description here</title></action>
        <action method="setTitle"><title>My title here</title></action>
    </reference>

This works absolutely fine. However, I currently do not know how I can apply this or a similar technique to the 2 pages I've outlined.

4

1 回答 1

4

做同样的事情,但在catalog.xml文件中应用它。您还可以设置local.xml以下内容:

<?xml version="1.0"?>
<layout version="0.1.0">
    <catalog_seo_sitemap_category translate="label">
        <reference name="head">
             <action method="setDescription" module="catalog"><title>Custom description here</title></action>
             <action method="setTitle" module="catalog"><title>Custom Site Map here</title></action>
        </reference>
    </catalog_seo_sitemap_category>
</layout>

您可以将相同的方法应用于catalog/seo_sitemap/product/

于 2013-04-14T14:52:53.390 回答