By sammy-node on
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)
/* $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!
Comments
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
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
--
Thank you
This was a problem I've been having for a while... thanks (3 years later)!
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
how can we create a new region in drupal 6.0
how can we create a new region in drupal 6.0
please tell me in which file I will have write this code & after this what will to do
.info file
Find your theme's .info file and create new regions there. If your theme is called "Awesome" then you are likely to find this .info file in the theme folder in your sites/all/themes/awesome/awesome.info.
I figure this one out a
I figured this one out a while back - here is the link http://drupal.org/node/237391
-----------------------------------------
Finally, I CMS that I Like!
http://www.CompShack.com