Skip to content

Instantly share code, notes, and snippets.

@MattReimer
Created April 12, 2012 23:04
Show Gist options
  • Save MattReimer/2371666 to your computer and use it in GitHub Desktop.
Save MattReimer/2371666 to your computer and use it in GitHub Desktop.
new hook_theme
/**
* Implements hook_theme().
*/
function cogito_theme($existing, $type, $theme, $path) {
global $theme;
$path_to_child = "/" . drupal_get_path('theme', $theme) . '/';
$path = is_file( getcwd() . $path_to_child . 'header.tpl.php' ) ? $path_to_child : $path;
return array(
'cogito_header' => array(
'template' => 'header',
'render element' => 'cogito_header',
'path' => $path,
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment