Looking in app/design/frontend/base/default/layout/catalog.xml, I see what appears to be conditional XML based on product type.

Additional block dependant on product type
    <PRODUCT_TYPE_simple translate="label" module="catalog">
        <label>Catalog Product View (Simple)</label>
        <reference name="product.info">
            <block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
                <block type="core/text_list" name="product.info.simple.extra" as="product_type_data_extra" translate="label">
                    <label>Product Extra Info</label>
    <PRODUCT_TYPE_configurable translate="label" module="catalog">
        <label>Catalog Product View (Configurable)</label>
        <reference name="product.info">
            <block type="catalog/product_view_type_configurable" name="product.info.configurable" as="product_type_data" template="catalog/product/view/type/default.phtml">
                <block type="core/text_list" name="product.info.configurable.extra" as="product_type_data_extra" translate="label">
                    <label>Product Extra Info</label>
        <reference name="product.info.options.wrapper">
            <block type="catalog/product_view_type_configurable" name="product.info.options.configurable" as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml"/>

How is this logic accomplished? Can these keywords be used in any layout files?

  • When layout XML is invoked for rendering, all layout XML files' contents are evaluated. Consider them all as one container; it's the layout update handles (including the ones you've noted) which are used for scoping purpose.
    – benmarks
    Jan 8, 2014 at 23:40

1 Answer 1


This "logic" are standard layout handles.

They are added here:

$update->addHandle('PRODUCT_TYPE_' . $product->getTypeId());
$update->addHandle('PRODUCT_' . $product->getId());

And yes, they can be used in every layout file. But I recommend to use a local.xml instead of changing the layout.xml files of the core - but this topic is a minefield ;-)

  • Thanks Fabian. Not changing core files, but building my own based on them. =D
    – Ryre
    Jan 8, 2014 at 23:12
  • I know what you mean, you copy the catalog.xml to your theme - I don't like this approach, because you get lots of problems after an update. the advantage is, you don't get all the new features after an update and the update doesn't crash your design, but maybe functionality ;) Jan 8, 2014 at 23:34

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.