You are here

function views_navigation_node_view in Views navigation 7

Implements hook_node_view().

Add next/previous links if needed.

File

./views_navigation.module, line 120
Views navigation module.

Code

function views_navigation_node_view($node, $view_mode, $langcode) {

  // Ensure we are viewing the node associated to the current page.
  $page_node = menu_get_object('node');
  if (!isset($page_node) || $page_node->nid != $node->nid) {
    return;
  }
  module_load_include('inc', 'views_navigation');
  $links = views_navigation_get_links($view_mode);
  if ($links) {
    $node->content['links']['views_navigation'] = $links;
  }
}