How to add custom layout handle to category in Magento 2
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:
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 ↵
Event system in Magento 1 vs. Magento 2
We are going to talk about event system approach in development. The event is a very flexible way to extend application logic. This approach is actual in both Magento 1 and Magento 2. Let’s go ahead and check how it works.
How to insert your block into any place in Magento
Hello guys, it’s time to tell you how to insert block into any place you want in Magento. As you know, very often we need to set some block into selected weird place without editing template, so we’ll try to describe the way how to do this using layouts and observers.