How do I add a custom template to my feature? I have a feature with a few views. How to I add a custom template file to it?

Edit: Based on sheena_d and schnippy's suggestions, here is my entire .module code. (It is still not working)

&lt;?php
/**
 * @file
 * Code for the Nigel Gallery feature.
 */

include_once('nigel_gallery.features.inc');


function nigel_gallery_init() {
  drupal_add_css(drupal_get_path('module', 'nigel_gallery') . '/nigel_gallery.css');
}

$theme_registry['template_file'] = array(
  'template' =&gt; drupal_get_path('module', 'nigel_gallery').'/templates/views-view--gallery-content.tpl.php',
  'type' =&gt; 'module',
);
For either content-type or views templates, you're going to need to manually add these to your features set since ctools exports doesn't handle these. In your features folder (ex. testfeature), you want to create a subfolder for templates:

/testfeature
    testfeatures.features.inc
    testfeatures.info
    testfeatures.module
    templates/


and then copy all of your custom templates into this folder. Then in the testfeatures.module folder, you just need to use hook_theme_registry_alter to add your content-type templates in:

function testfeatures_theme_registry_alter(&amp;$theme_registry) {
    $theme_registry['template-file']['path'] = drupal_get_path('module', 'my_feature')."/templates/";
}


For views templates, you should have more success using a hook_theme function, ex:

/**
 * Implements hook_theme().
 */
function nigel_gallery_theme() {
  return array(
    'views-view--gallery-content' =&gt; array(
      'variables' =&gt; array('view' =&gt; NULL, 'options' =&gt; NULL, 'row' =&gt; NULL),
      'template' =&gt; ' views-view--gallery-content',
      'path' =&gt; drupal_get_path('module', 'nigel_gallery'),
    ),
  );
}