How to add a new region in drupal 6 themes

When you want to configure your default theme like
adding new region just edit your .info file of your theme
e.g garland.info


Here is an example code:


regions[logout] = Logout
regions[left] = Left sidebar
regions[right] = Right sidebar
regions[header] = Header
regions[content] = Content
regions[footer] = Footer

2 comments:

baldo said...

mhh.. it's not only that..

arnelbornales said...

Thanks for the comment!!!

yes, it's not only that...i forget an example on how to call our newly created region supposing that our new region is "logout". We will call this in our page.tpl.php or page-front.tpl.php if you have one.

sorry i can't post html or php code here, by calling print "$logout" you will be able to output the new region named logout. This is just a demo, just remove the quotes.

That's it! If there any thing that i've missed please do tell me.
It will help not only help me but also others to understand and utilize drupal.

Post a Comment