在每次请求时在Magento中记录所有加载的布局句柄

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在每次请求时在Magento中记录所有加载的布局句柄相关的知识,希望对你有一定的参考价值。

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));

以上是关于在每次请求时在Magento中记录所有加载的布局句柄的主要内容,如果未能解决你的问题,请参考以下文章