Can't create new region in Drupal 6 (from a converted drupal 5 template that works otherwise)
duncano74 - February 21, 2008 - 05:37
Hi - I've tried amending the template.php file to add a region as follows;
(This is from a 5 tempalte which I upgraded to Drupal 6 smiply by adding the new .info file to my template file - apart from this issue it seems to work great)
<?php
/* $Id: template.php,v 1.1 2006/06/28 18:31:05 rkerr Exp $ */
function base_theme_regions() { **********this line is where I have written my theme name ******
return array(
'header' => t('header'),
'busy' => t('busy'), ******this is the region I added******
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content' => t('content'),
'footer' => t('footer'),
);
}
?>This works in 5 great, but the new region isn't selectable in the block admin page
Thanks in advance for any suggestions!

In Drupal 6, regions are
In Drupal 6, regions are defined in the .info file of your theme and not anymore via the regions hook. See http://drupal.org/node/171205 for more information, especially http://drupal.org/node/171205#regions
Thanks. I followed the
Thanks. I followed the tutorial.I've added regions[homepage]=homepage then it didn't show up. I cleared cache and it shows but shows only homepage. No matter what i do, i cant' get back original region. I get the following error
* The block Technology category latest items was assigned to the invalid region left and has been disabled.* The block Recent blog posts was assigned to the invalid region right and has been disabled.
* The block Powered by Drupal was assigned to the invalid region footer and has been disabled.
* The block User login was assigned to the invalid region left and has been disabled.
* The block Navigation was assigned to the invalid region left and has been disabled.
re: Thanks. I ...
Once you create even a single custom region then you have to define the formerly default regions in the theme's .info file. I just ran across this same problem.
I just added the default regions back into the .info file:
regions[left] = Left sidebar
regions[right] = Right sidebar
regions[content] = Content
regions[header] = Header
regions[footer] = Footer
Once I did this everything popped back into place.
--
John Barneson
Digital Library Development Lab
University of Minnesota Libraries
320 Walter Library
612-624-7322
barne102@umn.edu
Jabber/GTalk: barneson.john@gmail.com
--
I will have to keep this in
I will have to keep this in mind when upgrading as I have 2 custom regions in 5.7 - Will update this post with any issues :)
-----------------------------------------
Finally, I CMS that I Like!
http://www.CompShack.com