Define new regions in your theme

Categories:

Define new regions in your theme

This snippet contains the default regions in the bluemarine theme. I just copy and paste it in the template.php and start adding new ones to the array. And then I define them inside my page.tpl.php

This is very useful if you want to place blocks in custom places and easily manage them from the blocks page.

<?php

/**
* @desc define new regions in your pages for this theme
*/
function mytheme_regions() {
  return array(
   
'sidebar_right' => t('right sidebar'),
   
'sidebar_left' => t('left sidebar'),
   
'content' => t('content'),
   
'header' => t('header'),
   
'footer' => t('footer')
  );
}

?>

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
3 + 11 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.