Created
June 5, 2013 05:00
-
-
Save kevinchampion/5711712 to your computer and use it in GitHub Desktop.
page override
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', | |
), | |
'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