Magento: Load & Render Custom Layout Handle

Layout handles can be custom blocks that you want to load/display at any part of your page.

In this article, I will show how to define layout handle in your layout xml file and call that handle from your module’s controller class.

Suppose, you have a custom module and you want to display your custom block in product (catalog) view page. Here is the xml code for your custom layout handle. This code should be placed in your module’s layout xml file.

About

Mukesh Chapagain is a graduate of Kathmandu University (Dhulikhel, Nepal) from where he holds a Masters degree in Computer Engineering. Mukesh is a passionate web developer who has keen interest in open source technologies, programming & blogging. more...