i'm fairly new to magento, so i might not get all terms right. it's also possible that i haven't fully understood the magento internals which work through layouts and templates to print a webpage to the customer. i followed some simple tutorial to add a module to magento which provides me three additional options too choose from when setting the page_layout for categories/products. so far so good. the entries show up in admin backend and the templates i associated to these page_layouts are correctly loaded if i browse to a custom layout category.

i've removed and added plenty of blocks via local.xml. i've been using <default> (which targets all layouts iirc) and <catalog_category_default> (which is parsed when browsing a category). so in know how to use and "<block type="foo/myblock" name="my.precious.block" /> to remove or display a block.

now i want to add a block to one of my custom layouts. my /magento/app/code/local/Foo/Layout/etc/config.xml looks like this:

<?xml version="1.0"?>
                <foo_category_a module="page" translate="label">
                    <label>CustomCategory (A)</label>
                    <update handle="foo_cat_a" />

/app/etc/modules/Foo_Layout.xml looks like this:

<?xml version="1.0"?>
                <Mage_Page />

and my /app/design/frontend/default/foo/layout/local.xml like this:

<?xml version="1.0"?>
<layout version="0.1.0">  
        <reference name="head">
            <action method="addCss"><stylesheet>css/foo.css</stylesheet></action>

        <reference name="header">
            <remove name="topSearch" />

        <reference name="right">
            <remove name="right.permanent.callout" />

        <reference name="left">
            <remove name="left.permanent.callout" />

        <reference name="root">
            <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml" />

        category view mods
        <reference name="left">
            <remove name="catalog.leftnav" />
            <remove name="currency" />
            <remove name="tags_popular" />

        <remove name="products.info" />

so i have: layouts added: check selectable in admin: check correctly loading the specified templates: check being able to add blocks to custom layout: fail :(

what am i missing here? i searched the web up and down, tried many different locations for layout-definition and the layout-update-code, but nothing worked so far.

the predefined handles work well (e.g. <catalog_category_default>) but not those defined by me.

greetings patrick

  • FYI, because you see your module working, its config file must be in named config.xml not conf.xml.
    – benmarks
    Commented Jul 25, 2013 at 12:43
  • And, where is foo_cat_a handle being applied? How do you think it should work? It won't be merged to the layout instructions without being added to the layout update object via PHP or via an <update /> directive in another handle.
    – benmarks
    Commented Jul 25, 2013 at 12:45
  • actually my config.xml is named "config.xml" only a typo in my qustion. same goes for the <update /> directive. the xml i posted here is a version where i had the <update /> removed again, because it did not work. i've edited my post, and again added it. but it still does not work...
    – patrick
    Commented Jul 25, 2013 at 13:06
  • This issue is well explained here: stackoverflow.com/questions/20249894/… - for those who need the selected Page Layout handle of a category to be set, I have added this to my GlobalHanle extension. github.com/ProxiBlue/GlobalHandle
    – ProxiBlue
    Commented Sep 4, 2015 at 4:52

1 Answer 1


<update handle="foo_cat_a" /> might not work because it is likely being parsed before the handle (which typically adds the product.info block handle) is being parsed.

To debug handle load/merge order you can follow the directions I have specified here

  • is there any way to get around that or at least debug this?
    – patrick
    Commented Jul 25, 2013 at 21:37
  • Edited in a link to debug method.
    – benmarks
    Commented Jul 25, 2013 at 21:52
  • your debug method did an awesome work for me. i figured out that no handles where called or even added. and because i had to learn about observers i also found a way to add layout-handles, which are working fine now. thank you!
    – patrick
    Commented Aug 7, 2013 at 9:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.