Drupal: BlockBar module
Submitted by chris on February 3, 2006 - 17:30. Drupal Modules
This article is for Drupal Newbies.
I installed the BlockBar module a few weeks ago. Trying to add it to a new Drupal site, I realized I had to go threw the same learning. This post might help.
Once install you need to modify your template. Looks like templates have a function that defines the "regions".
For the "smarty" engine templates, that function is defined in the file "smarty.engine" and it looks like this:
function smarty_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer'),
);
}
To enable 2 block bars, that PHP function becomes (feel free to change the string blockbar_container_X to what ever you want to display on the "Blocks" page):
function smarty_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer'),
'blockbar_container_1' => t('blockbar_container_1'),
'blockbar_container_2' => t('blockbar_container_2')
);
}
By the way this module rocks. Thank you der (the Author)!
For more information about custom regions see: Custom regions in Drupal
I installed the BlockBar module a few weeks ago. Trying to add it to a new Drupal site, I realized I had to go threw the same learning. This post might help.
Once install you need to modify your template. Looks like templates have a function that defines the "regions".
For the "smarty" engine templates, that function is defined in the file "smarty.engine" and it looks like this:
function smarty_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer'),
);
}
To enable 2 block bars, that PHP function becomes (feel free to change the string blockbar_container_X to what ever you want to display on the "Blocks" page):
function smarty_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer'),
'blockbar_container_1' => t('blockbar_container_1'),
'blockbar_container_2' => t('blockbar_container_2')
);
}
By the way this module rocks. Thank you der (the Author)!
For more information about custom regions see: Custom regions in Drupal

