Sometimes you want to make specific adjustments in a layout XML file for certain categories, products, or CMS pages.
Magento provides several ways to do this. For example, you can enter XML code into the "Layout Update" field directly on the product editing screen. This is then stored directly in the database.
But if you would like to deploy the changes through an XML file (layout XML), for example, you have to fall back on predefined handles such as PRODUCT_. IDs are unique (within your own system), but hard to read. That is why it would be nicer to work with descriptive names such as PRODUCT_super-tolles-produkt.
If you would like that too, feel free to use my Magento module on github:
https://github.com/netz98/N98_CustomLayoutHandles
The module loads new handles through an observer. You can then add these to your XML file:
<?xml version="1.0"?> <layout version="0.1.0"> <CATEGORY_my-name> <!-- ... --> </CATEGORY_my-name> <PRODUCT_my-name> <!-- ... --> </PRODUCT_my-name> <CMS_PAGE_home> <!-- ... --> </CMS_PAGE_home> </layout>