Is there a way to determine which blocks are attached to a handle and/or what child-blocks a block have?
Magento – How to determine all blocks and child blocks attached to a handle
blockslayout
blockslayout
Is there a way to determine which blocks are attached to a handle and/or what child-blocks a block have?
Best Answer
To get all handles see Mage_Core_Model_Layout_Update::getHandles()
For example inside a controller you can use it for debugging purposes like:
Note: use it after loadLayout or loadLayoutUpdates call
To get all block children see Mage_Core_Block_Abstract::getChild() without parameters Note: the getChild() returns all child blocks as an object so used something like
and you get an array with child block alias names
and if you want to see more about a block use