I currently use theme_blocks() in a base theme for Drupal 6, and I have had difficulty converting my theme to Drupal 7 because theme_blocks() is not used in Drupal 7. The below code is a simple implementation of the function and how I currently use it in Drupal 6:
/* Implementation of theme_blocks() */
function theme_blocks($region) {
var output = '';
if ($list = block_list($region)) {
//cycle through all blocks in a region
foreach ($list as $key => $block) {
//test each block for a given condition
if ($block->delta == 1) {
output = /* make some changes */
}
else {
output = /* theme per usual */
}
}
}
return $output;
}
So, essentially I was just using theme_blocks() to cycle through all blocks in a region, targeting a specific block, and change up a few things. The problem is that theme_blocks() is not anymore used in Drupal 7.
Is there a way to target specific block/blocks in a given region, and dynamically make changes based on a theme setting in Drupal 7?