We have overwritten the theme_ds_regions to work with the new HTML5 tags. Easy share, we can turn this into a plugin in the future... To be complete you should add an extra tag that wraps all regions, but the wrapper template files exists in the nd module (nd.tpl.php)

function YOUR_THEME_ds_regions($object_display, $module) {
$output = '';

foreach ($object_display->themed_regions as $region_name => $region_data) {

switch ($region_name) {
case 'left':
case 'right':
$output .= ' break;
case 'footer':
$output .= ' break;
case 'header':
$output .= ' break;
default: $output .= '

}

$output .= ' class="'. $module .'-region-'. $region_name;

// The middle region has a wrapper region and some sidebar related classes.
if ($region_name == 'middle') {
$output .= '-wrapper ';
}
if ($region_name == 'header' || $region_name == 'footer') {
$output .= ' clear-block';
}

// Extra classes or inline styles.
if (!empty($region_data['extra_class'])) {
$output .= $region_data['extra_class'];
}
$output .= '" ';
if (isset($region_data['inline_css'])) {
$output .= $region_data['inline_css'];
}

// Close the wrapper for middle if necessary.
if ($region_name == 'middle') {
$output .= '>

'. $region_data['content'] .'

';
}
else {
$output .= '>'. $region_data['content'];

switch ($region_name) {
case 'left':
case 'right':
$output .= '';
break;
case 'footer':
$output .= '';
break;
case 'header':
$output .= '';
break;
default: $output .= '

';
}
}
}

return $output;
}

Comments

kristofvanroy’s picture

Forgot to wrap the code

function YOUR_THEME_ds_regions($object_display, $module) {
  $output = '';

  foreach ($object_display->themed_regions as $region_name => $region_data) {

    switch ($region_name) {
      case 'left':
      case 'right':
        $output .= '<aside';
        break;
      case 'footer':
        $output .= '<footer';
        break;
      case 'header':
        $output .= '<header';
        break;
      default: $output .= '<div';
    }
   
    $output .= ' class="'. $module .'-region-'. $region_name;

    // The middle region has a wrapper region and some sidebar related classes.
    if ($region_name == 'middle') {
      $output .= '-wrapper ';
    }
    if ($region_name == 'header' || $region_name == 'footer') {
      $output .= ' clear-block';
    }

    // Extra classes or inline styles.
    if (!empty($region_data['extra_class'])) {
      $output .= $region_data['extra_class'];
    }
    $output .= '" ';
    if (isset($region_data['inline_css'])) {
      $output .= $region_data['inline_css'];
    }

    // Close the wrapper for middle if necessary.
    if ($region_name == 'middle') {
      $output .= '><div class="'. $module .'-region-'. $region_name .'">'. $region_data['content'] .'</div></div>';
    }
    else {
      $output .= '>'. $region_data['content'];

      switch ($region_name) {
        case 'left':
        case 'right':
          $output .= '</aside>';
          break;
        case 'footer':
          $output .= '</footer>';
          break;
        case 'header':
          $output .= '</header>';
          break;
        default: $output .= '</div>';
      }
    }
  }
  
  return $output;
}
swentel’s picture

Status: Active » Closed (fixed)

Added this node to the project page so people can look at it. This won't make it into DS core for D6 anymore. However, we'll look into this for D7!

mroscar’s picture

Title: HTML 5 support » HTML 5 support Added Grid 960 Support

thank you.. added grrid support.. not complete yet

function theme_ds_regions($object_display, $module) {

 $output = '';
  foreach ($object_display->themed_regions as $region_name => $region_data) {
  
    // Extra classes or inline styles.
    if (!empty($region_data['extra_class'])) {
      $extraclass = $region_data['extra_class'];
    }
	
    if ($region_name == 'header' || $region_name == 'footer') {
      $clearfx = 'clearfix';
    }
	
    if (isset($region_data['inline_css'])) {
      $incss = $region_data['inline_css'];
    }
  
     switch ($region_name) {
      case 'header':
      $headerregion = '<div class="'. $module .'-region-'. $region_name .' ' . $clearfx . '">'. $region_data['content'] .'</div>';
      break;
	  
      case 'left':
      $leftregion = '<div class="'. $module .'-region-'. $region_name .'">'. $region_data['content'] .'</div>';
      break;	  
	  
      case 'middle':
      $midregion = '<div class="'. $module .'-region-'. $region_name .'-wrapper '. $extraclass .'"><div class="'. $module .'-region-'. $region_name .'">'. $region_data['content'] .'</div></div>';
      break;	  
      default: 	  
	  
      $output .= '<div class="'. $module .'-region-'. $region_name .' ' . $clearfx . '">'. $region_data['content'] .'</div>';	 
    } 
	
  }

  return  $headerregion . $leftregion . $midregion . $output;
}