Close

     

Our Blog

How to add custom layout handle to category in Magento 2

December 6, 2018 // by Burlacu Vasilii

Disclaimer:

This post assumes the reader is familiar with Magento 2 modules and how they work. If not, it is highly recommended to read the documentation first. All files mentioned below must be placed inside a module.

TL;DR

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)

Event system in Magento 1 vs. Magento 2

February 28, 2016 // by Roman Glushko

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.

Comments (0)

How to insert your block into any place in Magento

March 5, 2013 // by Nick Kravchuk

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.

Comments (14)

Magento customer group layout handle

June 27, 2012 // by Alexander Turiak

It is a good idea to create a new layout handle in Magento when we need to be able to easily customize styling of pages or enable/disable specific blocks for the customer groups. Here is how.

Comments (5)