local.xml added to Magento layout directory but is not being applied and is ignored

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 01:43:07

问题


I'm using Alan Storm's advice from: Specify Category specific layout updates without using Magento's administration dashboard using several category specific layout updates inside of my local.xml.

I have validated the xml, and it is being returned as valid xml. I have enabled mage developer mode to on to report an error and have looked at the exception logs to see if something is wrong, however no luck.

here is my 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>

If anyone can tell me what I'm doing wrong, it would be much appreciated. Thank you.


回答1:


Under System -> Configuration go to Design. Make sure the current package name and layout fields are correctly setup according to your theme.




回答2:


After asking someone and after thinking about it, it turns out I was viewing cms pages, and those category layout handle only updates category pages not cms pages, i tested it on a category page and it works fine. so if i want those updates to happen on cms pages, i would have to use cms handles.



来源:https://stackoverflow.com/questions/23924964/local-xml-added-to-magento-layout-directory-but-is-not-being-applied-and-is-igno

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!