Skip to content

Instantly share code, notes, and snippets.

@kevinchampion
Created June 5, 2013 03:17
Show Gist options
  • Save kevinchampion/5711383 to your computer and use it in GitHub Desktop.
Save kevinchampion/5711383 to your computer and use it in GitHub Desktop.
override_page_template
/**
* Implements hook_theme().
*/
function content_vote_theme($existing, $type, $theme, $path) {
return array(
// VOTE BUTTONS
'content_vote' => array(
'variables' => array(
'gameid' => NULL,
'contentid' => NULL,
),
'file' => 'content_vote.theme.inc',
'template' => 'vote-page',
'render element' => 'page',
),
);
}
/**
* Implements hook_preprocess_page().
*/
function content_vote_preprocess_page(&$variables, $hook) {
if (arg(0) === 'content' && arg(1) === 'vote') {
$variables['theme_hook_suggestions'][] = 'vote_page';
}
dpm($variables['theme_hook_suggestions']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment