Skip to content

Instantly share code, notes, and snippets.

@khalib
Last active August 29, 2015 13:59
Show Gist options
  • Select an option

  • Save khalib/10494152 to your computer and use it in GitHub Desktop.

Select an option

Save khalib/10494152 to your computer and use it in GitHub Desktop.
function tlr_learning_rating_menu() {
$items = array();
$items['node/%node'] = array(
'page callback' => 'tlr_learning_rating_view_alt_page',
'page arguments' => array(1),
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $items;
}
function tlr_learning_rating_view_alt_page($nid) {
$node = node_load($nid);
if ($node->type == 'csm_learning_rating') {
$variables['addthis_buttons'] = theme('tlr_ui_addThis_buttons');
$variables['view_mode'] = 'full';
$variables['node'] = node_load(arg(1));
tlr_learning_rating_preprocess_node($variables);
return theme('tlr_learning_rating_view_alt_page', $variables);
}
else {
// For all other node types.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment