logo
Published on Technical articles on: Windows servers, Apache Web Server, MySQL, PHP, IIS (http://www.sitebuddy.com)

Drupal: BlockBar module

By chris
Created 3 Feb 2006 - 5:30pm
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

Source URL:
http://www.sitebuddy.com/Drupal/Modules/BlockBar