theme_blocks

Definition

theme_blocks($region)
includes/theme.inc, line 1017

Description

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

Namesort iconDescription
Themeable functionsFunctions that display HTML, and which can be customized by themes.

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;
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.