This module is now obsolete. I no longer maintain it.

Drupal 5 doesnt have a nice easy way for module developers to drop .tpl.php files in their module directories for use with modules that do a lot of output. I have no idea why. Drupal 6 has this but 5 does not. So I've created a module that allows module users to mimic the features of drupal 6 without the need to modify drupal 5 core files. It's not identical or perfect but its about as close as you can get without actually upgrading to 6 which may not be a path you can take because maybe some of your modules dont have a D6 version. Also, this system doesnt lock you into a '$content' variable like the normal drupal page template does. It allows you to create the '$content' using the $vars variable. $vars is an array that contains values that come straight from your module. There is also a custom_template.php file that allows themers to inject stuff into the $vars variable as well just like they would with drupal's template.php. Here's a small list of what this module allows you to do:

Create template files in your own Module directory (these can then be overridden by files of same name in current template dir as usual)
Send variable directly to a template (something not possible in d5 and I dont even think d6 does this either, though not sure on that).
New custom_template.php file for themers to use just like drupal's template.php

This module is VERY simplistic, its only like 90 lines, so it doesnt do a whole heck of a lot other than give you 2 functions called:
module_get_template_content($module_name, $type, $template_name, $region = '', $vars = '')
module_get_template_path($module_name, $type, $template_name, $region = '')

These 2 functions are explained in detail in the Docs page.

NOTE: If you use this for your modules then the module can be enabled under the phpGoogleStoreLocator group because this is actually part of a collaboration of modules I'm using to put together PGSL with. So if you drop the module in your modules dir and dont see it under 'other', thats because it's under phpGoogleStoreLocator.

Development and maintenance by CrystalDawn.net & Kappaluppa Company

Project Information

  • Maintenance status: Unknown
  • Development status: Obsolete
  • Module categories: Content Display
  • Downloads: 1,155
  • Last modified: October 8, 2010

Downloads