Close

     

Our Blog

Add custom layout handle to product page - Magento 2

January 31, 2019 // by Burlacu Vasilii

Ever struggled how to add programmatically a custom layout handle to a product page and what’s the best way to do it? Use the power of Magento 2 plugins (also called interceptors) added into the right place and you’re done!

Comments (0)

How to add custom layout handle to category in Magento 2

December 6, 2018 // by Burlacu Vasilii

In order to add a custom layout handle to category page, a (basic) Magento 2 module with these additional files and their content is needed:

1. The events.xml file to “subscribe” to the event and say which observer should be fired
2. An observer that adds a new layout handle to the page
3. A layout file that adds needed changes to the page

Comments (0)