| 1 |
<?php
|
| 2 |
// $Id: block.tpl.php,v 1.5 2009/10/17 05:50:28 webchick Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Default theme implementation to display a block.
|
| 7 |
*
|
| 8 |
* Available variables:
|
| 9 |
* - $block->subject: Block title.
|
| 10 |
* - $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 |
* - $contextual_links (array): An array of contextual links for the block.
|
| 15 |
* - $classes: String of classes that can be used to style contextually through
|
| 16 |
* CSS. It can be manipulated through the variable $classes_array from
|
| 17 |
* preprocess functions. The default values can be one or more of the following:
|
| 18 |
* - block: The current template type, i.e., "theming hook".
|
| 19 |
* - block-[module]: The module generating the block. For example, the user module
|
| 20 |
* is responsible for handling the default user navigation block. In that case
|
| 21 |
* the class would be "block-user".
|
| 22 |
*
|
| 23 |
* Helper variables:
|
| 24 |
* - $classes_array: Array of html class attribute values. It is flattened
|
| 25 |
* into a string within the variable $classes.
|
| 26 |
* - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
|
| 27 |
* - $zebra: Same output as $block_zebra but independent of any block region.
|
| 28 |
* - $block_id: Counter dependent on each block region.
|
| 29 |
* - $id: Same output as $block_id but independent of any block region.
|
| 30 |
* - $is_front: Flags true when presented in the front page.
|
| 31 |
* - $logged_in: Flags true when the current user is a logged-in member.
|
| 32 |
* - $is_admin: Flags true when the current user is an administrator.
|
| 33 |
*
|
| 34 |
* @see template_preprocess()
|
| 35 |
* @see template_preprocess_block()
|
| 36 |
* @see template_process()
|
| 37 |
*/
|
| 38 |
?>
|
| 39 |
<div id="block-<?php print $block->module . '-' . $block->delta; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
|
| 40 |
|
| 41 |
<?php if ($contextual_links): ?>
|
| 42 |
<?php print render($contextual_links); ?>
|
| 43 |
<?php endif; ?>
|
| 44 |
|
| 45 |
<?php if ($block->subject): ?>
|
| 46 |
<h2<?php print $title_attributes; ?>><?php print $block->subject ?></h2>
|
| 47 |
<?php endif;?>
|
| 48 |
|
| 49 |
<div class="content"<?php print $content_attributes; ?>>
|
| 50 |
<?php print $content ?>
|
| 51 |
</div>
|
| 52 |
</div>
|