Get list of all blocks for current page

For example in .phtml page just call this:

$blocks = Mage::app()->getLayout()->getAllBlocks();

and then you can retrieve the block names by:

$blockNames = array_keys($blocks);

 

 

Credit


Lukas
Lukas Stranovsky
I am the guy who made this. Sorry for typos.