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?

Comments

mpare’s picture

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!

mpare’s picture

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!