You are here

function recipe_theme_registry_alter in Recipe 6

Implementation of theme_registry_alter(). 'theme paths' for the node template doesn't include the recipe module directory. Add it so that the node-recipe template is found.

File

./recipe.module, line 75
recipe.module - share recipes

Code

function recipe_theme_registry_alter(&$theme_registry) {

  // modules/node is first, pop it off.
  $top_path = array_shift($theme_registry['node']['theme paths']);

  // Get the path to this module
  $module_path = drupal_get_path('module', 'recipe');

  // Stick the top path with the module path back on top
  array_unshift($theme_registry['node']['theme paths'], $top_path, $module_path);
}