Module Themeability Suggestions

squaretone - November 7, 2006 - 16:43

I'm writing a module that take various nodes and outputs them based on criteria such as taxonomy.

The nodes are themed according to page.tpl.php but I want the user to be able to override that at the module level so that the user can have a corresponding mymodule_page.tpl.php file supercede the page.tpl.php file when it exists. That way the user can have those nodes display normally most places on the site (page.tpl.php) but when they are listed by my module they use the alternate template file (mymodule_page.tpl.php).

Is there any way this could be done at the module level instead of having themers use template.php? I want to make this as simple as possible for themers. Maybe someone can suggest another module that takes a similar approach to theming so I can learn from it?

Thanks.

 
 

Drupal is a registered trademark of Dries Buytaert.