Home » Magento10 August 2015

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.

Now, you can load your layout handle from controller class. The following code should be placed in your controller action function. Thanks to Mike Whitby.

Hope this helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed

Comments are closed.