【发布时间】:2014-07-18 11:08:44
【问题描述】:
我正在使用来自 Specify Category specific layout updates without using Magento's administration dashboard 的 Alan Storm 的建议,在我的 local.xml 中使用了几个特定于类别的布局更新。
我已经验证了 xml,它作为有效的 xml 返回。我已启用法师开发者模式以报告错误并查看异常日志以查看是否有问题,但没有运气。
这是我的 local.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* local.xml
*
* Local layout modifications for our local theme
*
* @category design
* @package my_theme_default
* @copyright Copyright (c) 2011 Magebase.
*/
-->
<layout version="0.1.0">
<default>
<reference name="root">
<remove name="breadcrumbs"/>
<remove name="left.permanent.callout" /> <!--the dog-->
<remove name="right.permanent.callout" /> <!--back to school-->
</reference>
</default>
<reviews>
<reference name="root">
<remove name="header"/>
<remove name="footer"/>
</reference>
</reviews>
<review_product_list>
<reference name="root">
<remove name="header"/>
<remove name="footer"/>
</reference>
</review_product_list>
<CATEGORY_11> <!-- cat 5 or cat 6 -->
<reference name="content">
<block type="core/template" name="page.brand" template="page/brand.phtml" />
<block type="catalog/product_list" name="product_list" template="page/gourmet.phtml">
<block type="catalog/layer_view" name="filter_menu" template="catalog/layer/view.phtml"/>
</block>
</reference>
</CATEGORY_11>
<CATEGORY_12><!--cat 7 or cat 8 -->
<reference name="content">
<block type="core/template" name="page.brand" template="page/brand.phtml" />
<block type="catalog/product_list" name="product_list" template="page/toiletries.phtml">
<block type="catalog/layer_view" name="filter_menu" template="catalog/layer/view.phtml"/>
</block>
</reference>
</CATEGORY_12>
<CATEGORY_9> <!--cat 4 or cat5 -->
<reference name="content">
<block type="core/template" name="page.brand" template="page/brand.phtml" />
<block type="catalog/product_list" name="product_list" template="page/fashion.phtml">
<block type="catalog/layer_view" name="filter_menu" template="catalog/layer/view.phtml"/>
</block>
</reference>
</CATEGORY_9>
<CATEGORY_6> <!--cat_11 cat_3 -->
<reference name="content">
<block type="core/template" name="page.brand" template="page/brand.phtml" />
<block type="core/template" name="page.flip" template="page/flip.phtml" />
<block type="catalog/product_list" name="product_list" template="page/accessories.phtml">
<block type="catalog/layer_view" name="filter_menu" template="catalog/layer/view.phtml"/>
</block>
</reference>
</CATEGORY_6>
<CATEGORY_10> <!-- cat 6 or 7 -->
<reference name="content">
<block type="core/template" name="page.brand" template="page/brand.phtml" />
<block type="catalog/product_list" name="product_list" template="page/lifestyle.phtml">
<block type="catalog/layer_view" name="filter_menu" template="catalog/layer/view.phtml"/>
</block>
</reference>
</CATEGORY_10>
</layout>
如果有人能告诉我我做错了什么,将不胜感激。谢谢。
【问题讨论】:
-
值得注意的是分类页面显示为空白,因为管理面板中没有为 cms 页面设置内容
-
这个
<CATEGORY_11>存在吗? -
为此清除缓存。
-
嗨,是的,所有类别都存在并且缓存被禁用。
-
检查您的 xml 文件是否已损坏,即某些标签丢失等。是否已删除此
标签: xml magento magento-1.8 magento-layout-xml