64aaa9c241b9431aaa5934627957eef5749eec76
[project/zen.git] / templates / block.tpl.php
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Theme implementation to display a block.
7 *
8 * Available variables:
9 * - $block->subject: Block title.
10 * - $block->content: Block content.
11 * - $block->module: Module that generated the block.
12 * - $block->delta: An ID for the block, unique within each module.
13 * - $block->region: The block region embedding the current block.
14 * - $edit_links: A list of contextual links for the block. It can be
15 * manipulated through the variable $edit_links_array from preprocess
16 * functions.
17 * - $classes: String of classes that can be used to style contextually through
18 * CSS. It can be manipulated through the variable $classes_array from
19 * preprocess functions. The default values can be one or more of the
20 * following:
21 * - block: The current template type, i.e., "theming hook".
22 * - block-[module]: The module generating the block. For example, the user
23 * module is responsible for handling the default user navigation block. In
24 * that case the class would be "block-user".
25 * - region-count-[x]: The position of the block in the list of blocks in the
26 * current region.
27 * - region-odd: An odd-numbered block of the list of blocks in the current
28 * region.
29 * - region-even: An even-numbered block of the list of blocks in the current
30 * region.
31 * - count-[x]: The position of the block in the list of blocks on the current
32 * page.
33 * - odd: An odd-numbered block of the list of blocks on the current page.
34 * - even: An even-numbered block of the list of blocks on the current page.
35 *
36 * Helper variables:
37 * - $classes_array: Array of html class attribute values. It is flattened
38 * into a string within the variable $classes.
39 * - $edit_links_array: An array of contextual links for the block.
40 * - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
41 * - $zebra: Same output as $block_zebra but independent of any block region.
42 * - $block_id: Counter dependent on each block region.
43 * - $id: Same output as $block_id but independent of any block region.
44 * - $is_front: Flags true when presented in the front page.
45 * - $logged_in: Flags true when the current user is a logged-in member.
46 * - $is_admin: Flags true when the current user is an administrator.
47 *
48 * @see template_preprocess()
49 * @see zen_preprocess()
50 * @see template_preprocess_block()
51 * @see zen_preprocess_block()
52 * @see zen_process()
53 */
54 ?>
55 <div id="block-<?php print $block->module . '-' . $block->delta; ?>" class="<?php print $classes; ?>"><div class="block-inner">
56
57 <?php if ($block->subject): ?>
58 <h2 class="title"><?php print $block->subject; ?></h2>
59 <?php endif; ?>
60
61 <div class="content">
62 <?php print $block->content; ?>
63 </div>
64
65 <?php print $edit_links; ?>
66
67 </div></div> <!-- /block-inner, /block -->