Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.959 diff -u -p -r1.959 common.inc --- includes/common.inc 13 Aug 2009 03:03:03 -0000 1.959 +++ includes/common.inc 13 Aug 2009 05:53:22 -0000 @@ -4216,6 +4216,10 @@ function drupal_common_theme() { 'install_page' => array( 'arguments' => array('content' => NULL), ), + 'region' => array( + 'arguments' => array('elements' => NULL), + 'template' => 'region', + ), 'task_list' => array( 'arguments' => array('items' => NULL, 'active' => NULL), ), Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.504 diff -u -p -r1.504 theme.inc --- includes/theme.inc 13 Aug 2009 03:05:54 -0000 1.504 +++ includes/theme.inc 13 Aug 2009 05:53:22 -0000 @@ -2043,3 +2043,22 @@ function template_page_suggestions($args return $suggestions; } + +/** + * 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 region.tpl.php + */ +function template_preprocess_region(&$variables) { + // Create the $content variable that templates expect. + $variables['content'] = $variables['elements']['#children']; + $variables['region'] = $variables['elements']['#region']; + + $region = 'region-' . str_replace('_', '-', $variables['region']); + $variables['classes_array'][] = $region; + $variables['template_files'][] = $region; +} Index: modules/system/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/system/page.tpl.php,v retrieving revision 1.27 diff -u -p -r1.27 page.tpl.php --- modules/system/page.tpl.php 3 Aug 2009 03:04:33 -0000 1.27 +++ modules/system/page.tpl.php 13 Aug 2009 05:53:22 -0000 @@ -144,11 +144,7 @@ - -
- -
- + @@ -171,20 +167,18 @@

-
- -
+ -