Magento: category custom layout update (to set new product_list template) is not working

Magento: category custom layout update (to set new product_list template) is not working

August 6, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento: category custom layout update (to set new product_list template) is not working

Magento: Category Custom Layout Update Not Working for Product List Template

If you’re trying to use a custom <code>product/list.phtml</code> template for specific categories in Magento (Enterprise Edition 1.9), you might run into issues with the layout update not working as expected. This blog post will guide you through resolving this common problem.

Understanding the Problem

You’ve tried applying a custom layout update to your target category using the provided XML code:

<reference name="product_list">
    <action method="setTemplate"><template>catalog/category/list_custom.phtml</template></action>
</reference>

However, even after re-indexing and disabling cache, the product list template doesn’t change. You’ve verified that the custom template (list_custom.phtml) exists in the correct path (app/design/frontend/package/theme/template/catalog/category/).

The Surprising Solution

The issue lies in Magento’s default category layout structure. By default, the product_list block is nested within the category_products block, which is defined in the global layout file (layout/catalog.xml).

To ensure your custom template works for specific categories only, you need to override the category view block rather than updating the product list block directly.

Step-by-Step Solution

  1. Create a new XML layout file

Navigate to your theme’s local layout directory (e.g., app/design/frontend/package/theme/layout/). If it doesn’t exist, create both the package and theme folders along with an xml folder inside.

  1. Add the custom layout update

Create a new XML file, e.g., catalog_category_view.xml, and add the following content:

<reference name="content">
    <block type="catalog/category_view" name="category_products" template="catalog/category/view.phtml">
        <block type="catalog/product_list" name="product_list" before="-" template="catalog/category/list_custom.phtml"/>
    </block>
</reference>
  1. Apply the custom layout

In your target category’s custom layout update, apply the new XML file:

<update handle="catalog_category_view"/>

Your final custom layout update should look like this:

<reference name="content">
    <block type="catalog/category_view" aspn="category_products" template="catalog/category/view.phtml">
        <action method="setTemplate"><template>catalog/category/list_custom.phtml</template></action>
    </block>
</reference>

<update handle="catalog_category_view"/>
  1. Save and re-index

After saving the changes, clear your cache (if enabled) and re-index all catalog data.

Conclusion

The key to successfully applying a custom product list template for specific categories in Magento is understanding the default layout structure and properly overriding the category view block.

By creating a new XML layout file at the correct location (app/design/frontend/package/theme/layout/catalog_category_view.xml) and applying it through your category’s custom layout update, you can ensure that only the selected categories use the desired template while keeping the default behavior for others.

Remember to clear cache (if enabled) and re-index after making changes. If you’re still experiencing issues, double-check that your custom template (list_custom.phtml) is located in the correct directory (app/design/frontend/package/theme/template/catalog/category/).

For more detailed guides on Magento development and best practices, visit Laravel Company.

Magento 1 Catalog Cache Indexing

Our network