Can you create a region from a module?

alexis - May 1, 2007 - 16:58

Hi, I'm creating a module that needs to add some HTML code to the head of pages and before the closing body, so far I've done it using drupal_set_html_head() and hook_footer() in my hook_menu().

I need to do it from my module because I don't want to require the site administrator to create a custom theme, even if it just needs a few lines of HTML in page.tpl.php.

My module will provide a block and I need a special region for this block and I was wondering if I can create the region from the module. The usual way with PHPTemplate is using mytheme_regions() in template.php but, again, that requires customizing a theme.

Is it possible creating new regions from module code without modifying a theme?

Interested In Just That Myself

mpare - May 4, 2007 - 03:24

Alex, fancy seeing you here. I too am looking at a method of creating a region via modules.

Peace,
-mpare
www.paretech.com

Did you figure out how to do something? Did you find documentation on Drupal.org inadequate? Well now it's your turn. Document your Success!

Block Bar module may prove helpful

mpare - May 4, 2007 - 03:40

Alex, I found the Block Bar Module just a bit a go.

http://drupal.org/project/blockbar

I'm about to cut it open to see how it works. I'm also using this approach to generate tab blocks for your site actually. :)

Peace,
-mpare
www.paretech.com

Did you figure out how to do something? Did you find documentation on Drupal.org inadequate? Well now it's your turn. Document your Success!

 
 

Drupal is a registered trademark of Dries Buytaert.