How to get a complete list of blocks that are active content on current page? I'm trying to get a full list of blocks that are active content on the current page. Preferably it would include details of what type of content is displayed in the block.
I need this information to display ads in the blocks. The ads need to be loaded through the javascript snippet, that I can place in the header (through drupal_add_js). But first I need to know if the block that contains the ad is active and that's why I need this list of blocks.
I'm using Drupal 7.
Follow the instruction to get the details of block for current page


In this template_preprocess_page function You can get a variable in that u have all region and it's block array
Using the above function we can get all the information of blocks note(if u want to see know the regions list see this function system_region_list