如何将网站地图页面的默认主题更改为自定义主题


how to change default theme to custom theme for sitemap page?

我已经在我的magento网站上启用了站点地图。不幸的是,它在magento的默认模板中显示了如何为网站地图页面启用我的自定义主题。

提前谢谢。

您可以通过布局处理程序XML文件更改默认Magento站点地图的主题。检查您的主题布局中是否有catalog.xml

app/design/frontend/YOUR_PACKAGE/YOUR_THEME/layout/catalog.xml

如果没有,请从以下文件夹复制:

/app/design/frontend/base/default/layout/catalog.xml

要更改默认Magento网站地图页面的模板或包/主题,请按以下方式编辑:

查找此块:

<catalog_seo_sitemap translate="label">
    <label>Catalog Seo Sitemap (Common)</label>
    <remove name="right"/>
    <remove name="left"/>
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>

将这行代码添加到<reference name="root">部分:

<action method="setTheme"><theme>default/iphone</theme></action>            

测试它是否有效。现在您可以用自己的package/theme:替换default/iphone

<action method="setTheme"><theme>YOUR_PACKAGE/YOUR_THEME</theme></action>

如果不起作用,请尝试通常的方法:

  • 清除缓存
  • 刷新缓存存储/delete/var/cache文件夹内容