4.6 theme.inc theme_blocks($region)
4.7 theme.inc theme_blocks($region)
5 theme.inc theme_blocks($region)
6 theme.inc theme_blocks($region)

Return a set of blocks available for the current user.


$region: Which set of blocks to retrieve.

Return value

A string containing the themed blocks for this region.

Related topics

1 call to theme_blocks()
chameleon_page in themes/chameleon/chameleon.theme
1 theme call to theme_blocks()
template_preprocess_page in includes/theme.inc
Process variables for page.tpl.php
11 string references to the theme hook from theme_blocks()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

block-admin-display-form.tpl.php in modules/block/block-admin-display-form.tpl.php
block-admin-display-form.tpl.php Default theme implementation to configure blocks.
block_schema in modules/block/block.install
Implementation of hook_schema().
drupal_common_theme in includes/common.inc
Provide theme registration for themes across .inc files.
system_theme in modules/system/system.module
Implementation of hook_theme().
system_update_6016 in modules/system/system.install
Make {node}'s primary key be nid, change nid,vid to a unique key. Add primary keys to block, filters, flood, permission, and term_relation.

... See full list


includes/theme.inc, line 1651
The theme system, which controls the output of Drupal.


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;


If you're looking for something similar to this with Drupal 7 look at block_get_blocks_by_region
Drupal Commerce Themes