Default theme implementation to display a region.
Available variables:
- $content: The content for this region, typically blocks.
- $classes: String of classes that can be used to style contextually through
CSS. It can be manipulated through the variable $classes_array from
preprocess functions. The default values can be one or more of the following:
- region: The current template type, i.e., "theming hook".
- region-[name]: The name of the region with underscores replaced with dashes. For example, the page_top region would have a region-page-top class.
- $region: The name of the region variable as defined in the theme's .info file.
Helper variables:
- $classes_array: Array of html class attribute values. It is flattened into a string within the variable $classes.
- $is_admin: Flags true when the current user is an administrator.
- $is_front: Flags true when presented in the front page.
- $logged_in: Flags true when the current user is a logged-in member.
See also
File
modules/system/region.tpl.phpView source
- <?php
-
- /**
- * @file
- * Default theme implementation to display a region.
- *
- * Available variables:
- * - $content: The content for this region, typically blocks.
- * - $classes: String of classes that can be used to style contextually through
- * CSS. It can be manipulated through the variable $classes_array from
- * preprocess functions. The default values can be one or more of the following:
- * - region: The current template type, i.e., "theming hook".
- * - region-[name]: The name of the region with underscores replaced with
- * dashes. For example, the page_top region would have a region-page-top class.
- * - $region: The name of the region variable as defined in the theme's .info file.
- *
- * Helper variables:
- * - $classes_array: Array of html class attribute values. It is flattened
- * into a string within the variable $classes.
- * - $is_admin: Flags true when the current user is an administrator.
- * - $is_front: Flags true when presented in the front page.
- * - $logged_in: Flags true when the current user is a logged-in member.
- *
- * @see template_preprocess()
- * @see template_preprocess_region()
- * @see template_process()
- *
- * @ingroup themeable
- */
- ?>
- <?php if ($content): ?>
- <div class="<?php print $classes; ?>">
- <?php print $content; ?>
- </div>
- <?php endif; ?>
-
Comments
actual location of the file
Permalinkand the file is here "modules/system/region.tpl.php", if you came here looking for a copy.
Correction about the name
PermalinkIf i'm right and after doing some testing... it should be region--page-top and not region-page-top the file name of the TPL. I think it's missing a dashed "-" between the region and the region name...
On my setup I have to add the second dashed to make it work.
Me too!
PermalinkMe too!
The way this works:
region--content.tpl.php