Created
December 26, 2011 00:33
-
-
Save davereid/1520145 to your computer and use it in GitHub Desktop.
Allowing node template in your module directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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