On this page
region.tpl.php
Last updated on
7 December 2017
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
The region.tpl.php file returns HTML for 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
template_preprocess()
template_preprocess_region()
zen_preprocess_region() in zen's template.php
template_process()
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion