Log down all loaded layout handles in Magento on each request

/ Published in: PHP
Save to your folder(s)

Snippet for getting the layout handles in Magento on each request, helpful for front-end developers.

Copy this code and paste it in your HTML
  1. //Mage_Core_Model_Layout model
  2. $layout = Mage::getSingleton('core/layout');
  4. //Get handles array with Mage_Core_Model_Layout_Update model
  5. $handles = $layout->getUpdate()->getHandles();
  7. //Log the handles
  8. Mage::log('Layout handles: '.print_r($handles, true));

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.