diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-28 11:35:34 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-28 11:35:34 +0000 |
commit | 43d73f81c93ceda3b3380058135169dc340a7146 (patch) | |
tree | 575436ae3e78a36875a2de14f6f4f0cbd91f3450 /modules/system/block.tpl.php | |
parent | 42be9d1311b5fd689f68f57e513503a3a7c52356 (diff) | |
download | brdo-43d73f81c93ceda3b3380058135169dc340a7146.tar.gz brdo-43d73f81c93ceda3b3380058135169dc340a7146.tar.bz2 |
#166071 by jjeff and dvessel: move default template preprocess code to template_preprocess, and add *lots* of documentation to template files and functions
Diffstat (limited to 'modules/system/block.tpl.php')
-rw-r--r-- | modules/system/block.tpl.php | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/modules/system/block.tpl.php b/modules/system/block.tpl.php index 52bf62b10..3b60cf9f0 100644 --- a/modules/system/block.tpl.php +++ b/modules/system/block.tpl.php @@ -1,11 +1,38 @@ <?php // $Id$ + +/** + * @file block.tpl.php + * + * Theme implementation to display a block. + * + * Available variables: + * - $block->subject: Block title. + * - $block->content: Block content. + * - $block->module: Module that generated the block. + * - $block->delta: This is a numeric id connected to each module. + * - $block->region: The block region embedding the current block. + * + * Helper variables: + * - $block_zebra: Outputs 'odd' and 'even' dependent on the default sidebar + * block regions. + * - $zebra: Same output as $block_zebra but independent of any block region. + * - $block_id: counter within the default sidebar block regions. + * - $id: Same output as $block_id but independent of any block region. + * - $is_front: Flags true when presented in the front page. + * - $logged_in: Flags true when the current user is a logged-in member. + * - $is_admin: Flags true when the current user is an administrator. + * + * @see template_preprocess() + * @see template_preprocess_block() + */ ?> <div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module ?>"> - <?php if ($block->subject): ?> <h2><?php print $block->subject ?></h2> <?php endif;?> - <div class="content"><?php print $block->content ?></div> + <div class="content"> + <?php print $block->content ?> + </div> </div> |