In addition to Eaton's answer. If you need to override an existing template (.tpl.php file) provided by another module, you can use hook_theme_registry_alter in YOUR_FEATURE.module
function YOUR_FEATURE_registry_alter($theme_registry) { $originalpath = array_shift($theme_registry['TEMPLATE']['theme paths']); $featurepath = drupal_get_path('module', 'YOUR_FEATURE') .'/themes'); array_unshift($theme_registry['TEMPLATE']['theme paths'], $originalpath, $featurepath); }
In order for this to work, your function must have a weight greater than the weight of the module providing the overridden template. So in YOUR_FEATURE.install you will have something like
function YOUR_FEATURE_install() { db_query("UPDATE {system} SET weight = 10 WHERE name = 'YOUR_FEATURE'"); }
Pierre buyle
source share