Created
June 5, 2013 03:17
-
-
Save kevinchampion/5711383 to your computer and use it in GitHub Desktop.
override_page_template
This file contains hidden or 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(). | |
*/ | |
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