Document region.tpl.php (D7) in theming guide and theme update guide

Created on 30 April 2010, over 14 years ago
Updated 7 May 2023, over 1 year ago

Flagging this for now: region.tpl.php is not documented in the handbooks. Point to document: Regions are printed with a different syntax than in D6 (this is partially documented in passing on the update page, but the template itself is not addressed).

http://api.drupal.org/api/drupal/modules--system--region.tpl.php/7 of course has the nuts and bolts, but the template file itself has useful documentation that can be incorporated:

* 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.

I'm blogging about theme changes and in the course will revisit this and (help) fix.

📌 Task
Status

Active

Component

Missing documentation

Created by

🇺🇸United States laura s

Live updates comments and jobs are added and updated live.
  • theming

    Used in Documentation issues related to theming

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024