Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function THEME_preprocess_node(&$variables, $hook)
- if (preg_match('//ARGUMENT$/', check_plain(current_path()))){
- $variables['theme_hook_suggestions'][] = 'node__' . $variables['type'] . '__ARGUMENT';
- }
- function THEME_preprocess_node(&$variables) {
- $variables['theme_hook_suggestions'][] = 'node__' . $variables['view_mode'];
- }
- function THEME_preprocess_node(&$variables) {
- $variables['theme_hook_suggestions'][] = 'node__' . $variables['type'] . '__' . $variables['view_mode'];
- }
- function HOOK_menu() {
- $items['node/%/argument'] = array(
- 'page callback' => 'node_custom_view',
- 'page arguments' => array(1, 2),
- 'access arguments' => array('access content'),
- 'type' => MENU_CALLBACK,
- );
- return $items;
- }
- function node_custom_view($arg1, $arg2) {
- $content = '';
- if (is_numeric($arg1) && $arg2 == 'argument') {
- $node = node_load($arg1, $vid = NULL, $reset = FALSE);
- $content = drupal_render(node_view($node, $view_mode = 'custom_view', $langcode = NULL));
- }
- return $content;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement