Posted By

zoranmk on 11/26/11


Tagged

php xml layout magento


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

WGenie


Log down all loaded layout handles in Magento on each request


 / Published in: PHP
 

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

  1. //Mage_Core_Model_Layout model
  2. $layout = Mage::getSingleton('core/layout');
  3.  
  4. //Get handles array with Mage_Core_Model_Layout_Update model
  5. $handles = $layout->getUpdate()->getHandles();
  6.  
  7. //Log the handles
  8. Mage::log('Layout handles: '.print_r($handles, true));

Report this snippet  

You need to login to post a comment.