I'm trying to get a list of all blocks for a certain path but can't figure how to do that.
For example, on the page at url "node/5", I have a few blocks on different regions (sidebars, content bottom, footer). I need to get a list of all these blocks that should be rendered on this page (node/5)
UPDATE:
this seems to work but only for the "content" region.
global $theme;
$all_regions = system_region_list($theme);
$blocks = array();
foreach (array_keys($all_regions) as $region) {
$blocks += block_list($region);
}
Before this piece of code I run menu_execute_active_handler('node/2', false)
because i want to get the blocks for a specific path (Eg: node/2). Unfortunately, it only grab the "content" blocks, no header/footer blocks
Any ideeas? Thanks