theme_block

5 theme.inc theme_block($block)
6 theme.php theme_block()
7 theme.php theme_block($variables)
8 theme.php theme_block($variables)

Return a themed block.

You can style your blocks by defining .block (all blocks), .block-<i>module</i> (all blocks of module <i>module</i>), and \#block-<i>module</i>-<i>delta</i> (specific block of module <i>module</i> with delta <i>delta</i>) in your theme's CSS.

Parameters

$block: An object populated with fields from the "blocks" database table ($block->module, $block->delta ...) and fields returned by <i>module</i>_block('view') ($block->subject, $block->content, ...).

Return value

A string containing the block output.

Related topics

1 theme call to theme_block()

File

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

Code

function theme_block($block) {
  $output  = "<div class=\"block block-$block->module\" id=\"block-$block->module-$block->delta\">\n";
  $output .= " <h2 class=\"title\">$block->subject</h2>\n";
  $output .= " <div class=\"content\">$block->content</div>\n";
  $output .= "</div>\n";
  return $output;
}
Login or register to post comments