Skip to content

Instantly share code, notes, and snippets.

@davereid
Created December 26, 2011 00:33
Show Gist options
  • Save davereid/1520145 to your computer and use it in GitHub Desktop.
Save davereid/1520145 to your computer and use it in GitHub Desktop.
Allowing node template in your module directory
/**
* Implements hook_theme_registry_alter().
*/
function mymodule_theme_registry_alter(&$info) {
// Inject our module into the node theme registry as being an available theme
// path so that we can override the node template for our content type.
array_splice($info['node']['theme paths'], 1, 0, array(drupal_get_path('module', 'mymodule')));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment