Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.981 diff -u -p -r1.981 common.inc --- includes/common.inc 31 Aug 2009 18:43:12 -0000 1.981 +++ includes/common.inc 1 Sep 2009 14:28:57 -0000 @@ -4486,6 +4486,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.519 diff -u -p -r1.519 theme.inc --- includes/theme.inc 31 Aug 2009 19:50:17 -0000 1.519 +++ includes/theme.inc 1 Sep 2009 14:28:57 -0000 @@ -2292,3 +2292,22 @@ function template_preprocess_maintenance $variables['template_file'] = 'maintenance-page-offline'; } } + +/** + * 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/block/block-admin-display-form.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block-admin-display-form.tpl.php,v retrieving revision 1.6 diff -u -p -r1.6 block-admin-display-form.tpl.php --- modules/block/block-admin-display-form.tpl.php 15 May 2008 21:30:02 -0000 1.6 +++ modules/block/block-admin-display-form.tpl.php 1 Sep 2009 14:28:58 -0000 @@ -45,8 +45,8 @@ $title): ?> - - + + Index: modules/block/block.css =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.css,v retrieving revision 1.6 diff -u -p -r1.6 block.css --- modules/block/block.css 14 Nov 2007 09:49:30 -0000 1.6 +++ modules/block/block.css 1 Sep 2009 14:28:58 -0000 @@ -1,6 +1,6 @@ /* $Id: block.css,v 1.6 2007/11/14 09:49:30 dries Exp $ */ -#blocks td.region { +#blocks tr.region-title td { font-weight: bold; } #blocks tr.region-message { Index: modules/block/block.test =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.test,v retrieving revision 1.27 diff -u -p -r1.27 block.test --- modules/block/block.test 28 Aug 2009 19:44:05 -0000 1.27 +++ modules/block/block.test 1 Sep 2009 14:28:58 -0000 @@ -26,10 +26,10 @@ class BlockTestCase extends DrupalWebTes // Define the existing regions $this->regions = array(); - $this->regions[] = array('name' => 'header', 'id' => 'header-region'); - $this->regions[] = array('name' => 'sidebar_first', 'id' => 'sidebar-first'); - $this->regions[] = array('name' => 'content', 'id' => 'center'); - $this->regions[] = array('name' => 'sidebar_second', 'id' => 'sidebar-second'); + $this->regions[] = array('name' => 'header', 'class' => 'region region-header clearfix'); + $this->regions[] = array('name' => 'sidebar_first'); + $this->regions[] = array('name' => 'content'); + $this->regions[] = array('name' => 'sidebar_second'); $this->regions[] = array('name' => 'footer'); } @@ -193,8 +193,8 @@ class BlockTestCase extends DrupalWebTes function moveBlockToRegion($block, $region) { // If an id for an region hasn't been specified, we assume it's the same as the name. - if (!(isset($region['id']))) { - $region['id'] = $region['name']; + if (!(isset($region['class']))) { + $region['class'] = 'region region-' . str_replace('_', '-', $region['name']); } // Set the created block to a specific region. @@ -209,7 +209,7 @@ class BlockTestCase extends DrupalWebTes $this->assertText(t($block['title']), t('Block successfully being displayed on the page.')); // Confirm that the custom block was found at the proper region. - $xpath = '//div[@id="' . $region['id'] . '"]//div[@id="block-' . $block['module'] . '-' . $block['delta'] . '"]/*'; + $xpath = '//div[@class="' . $region['class'] . '"]//div[@id="block-' . $block['module'] . '-' . $block['delta'] . '"]/*'; $this->assertFieldByXPath($xpath, FALSE, t('Custom block found in %region_name region.', array('%region_name' => $region['name']))); } } Index: modules/system/page.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/system/page.tpl.php,v retrieving revision 1.32 diff -u -p -r1.32 page.tpl.php --- modules/system/page.tpl.php 31 Aug 2009 19:50:18 -0000 1.32 +++ modules/system/page.tpl.php 1 Sep 2009 14:28:58 -0000 @@ -146,11 +146,7 @@ - -
- -
- + @@ -174,20 +170,18 @@
-
- -
+ -