This is a brief guide of where Drupal 7 will look for the template.tpl.php file in a hook_theme item depending on the 'template' and 'path' settings, or lack of. For a thorough and complete explanation head to the official hook_theme page.
Our setup:
Module: modules/mymodule
Theme: themes/mytheme
We're going to output the value using $html = theme('news_filters').
Configuration 1:
function mymodule_theme() { $themes = array(); $themes['news_filters'] = array( ); return $themes; }
Drupal looks for file news_filters.tpl.php in themes/mytheme/templates including subdirectories, ignoring the 'template' and 'path' values. If news_filters.tpl.php does not exist and 'template' and 'path' are not set, $html is blank.
Configuration 2:
function mymodule_theme() { $themes = array(); $themes['news_filters'] = array( 'template' => 'news_filters' ); return $themes; }
If news_filters.tpl.php does not exist in themes/mytheme/templates, Drupal will look for news_filters.tpl.php in modules/mymodule.
Configuration 3:
function mymodule_theme() { $themes = array(); $themes['news_filters'] = array( 'path' => drupal_get_path('theme', 'mytheme') . '/templates', 'template' => 'news_filters' ); return $themes; }
If news_filters.tpl.php does not exist in themes/mytheme/templates, setting 'path' will force Drupal to look for the news_filters.tpl.php in themes/mytheme/templates.