| 5 theme.inc | theme_blocks($region) |
| 6 theme.inc | theme_blocks($region) |
Return a set of blocks available for the current user.
Parameters
$region: Which set of blocks to retrieve.
Return value
A string containing the themed blocks for this region.
Related topics
File
- includes/
theme.inc, line 1639 - The theme system, which controls the output of Drupal.
Code
<?php
function theme_blocks($region) {
$output = '';
if ($list = block_list($region)) {
foreach ($list as $key => $block) {
// $key == <i>module</i>_<i>delta</i>
$output .= theme('block', $block);
}
}
// Add any content assigned to this region through drupal_set_content() calls.
$output .= drupal_get_content($region);
return $output;
}
?> Login or register to post comments
Comments
Drupal 7
If you're looking for something similar to this with Drupal 7 look at block_get_blocks_by_region
--
Drupal Commerce Themes