I have created a new template for a custom Page Layout to apply to the top-level categories only, using a custom module.

Here is my module/etc/config.xml file from the module (I am not posting the template or the /etc/module/xml file as I don't believe they are relevant. Let me know if you'd like to see them and I will edit):

<?xml version="1.0"?>
                <top_level_category_layout_name translate="label">
                    <label>New Top Level Category Layout</label>

I assigned this new page layout to all of the top level categories one by one by changing the option selected in the Page Layout dropdown of the Custom Design tab to the new page template - and that works great...but it seems to work too great actually.

The problem I'm having is the subcategories are also inheriting this new Page Layout, which is have only been assigned to it's parent. Use Parent Category Settings on subcategories are set to No.

I can resolve this issue by saving the child categories. If I save them (even without making any changes) the default page template is then reapplied to the subcategories and then work as expected.

Have I done something incorrect here or am I missing something? Why are the subcategories inheriting the parent category page template if it has not been assigned to it? I have also assigned the default template in the local.xml file:

    <reference name="root">
        <action method="setTemplate">

    <reference name="root">
        <action method="setTemplate">

If this is what I have to work with, how can I iterate through all of the categories and resave them safely without having to do so manually? I have hundreds of second level categories and really hope to avoid having to manually resave them. Thanks for your help!


If I disable Use Flat Catalog Category, then both the top-level and subcategories use the correct Page Layout template. How can I ensure that the subcategories use the correct Page Layout template when Use Flat Catalog Category is also enabled? Is there an attribute that I need to modify?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.