template_preprocess_region
- Versions
- 7
template_preprocess_region(&$variables)
Preprocess variables for region.tpl.php
Prepare the values passed to the theme_region function to be passed into a pluggable template engine. Uses the region name to generate a template file suggestions. If none are found, the default region.tpl.php is used.
See also
@see region.tpl.php
Code
includes/theme.inc, line 2593
<?php
function template_preprocess_region(&$variables) {
// Create the $content variable that templates expect.
$variables['content'] = $variables['elements']['#children'];
$variables['region'] = $variables['elements']['#region'];
$region = drupal_region_class($variables['region']);
$variables['classes_array'][] = $region;
$variables['template_files'][] = $region;
}
?>Login or register to post comments 