Magento Layout Handles

As a frontend developer at a digital agency that is no stranger to eCommerce, Magento’s local.xml is a best friend. Let’s face it, knowing your layout XML files is at the heart of knowing frontend Magento development and the more layout handles you know, the better — so I’d like share some with you. Want to target some specific categories, category types, products, etc. in layout files? Add a CMS block to only one product? Let’s keep our code clean by keeping it in local.xml.  Here we go —

Product Types (Commonly Known):

Simple :

Configurable :

Grouped :


Downloadable :

Bundled :
Specific Categories:

So if your category id is 25, your node would be:


Specific Product:

So if your product id is 134, you’d write:

… then perform whatever actions you’d like within the handles. Clean code that’s easy to read — just don’t forget to include comments!

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>