Skip to content

Instantly share code, notes, and snippets.

@kevinchampion
Created June 5, 2013 05:00
Show Gist options
  • Save kevinchampion/5711712 to your computer and use it in GitHub Desktop.
Save kevinchampion/5711712 to your computer and use it in GitHub Desktop.
page override
/**
* 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',
),
'page__vote' => array(
'template' => 'page--vote',
'path' => drupal_get_path('module', 'content_vote'),
),
);
}
/**
* Implements hook_preprocess_page().
*/
function content_vote_preprocess_page(&$variables, $hook) {
if (arg(0) === 'content' && arg(1) === 'vote') {
$variables['theme_hook_suggestions'][] = 'page__vote';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment