You are here

function book_node_view in Drupal 7

Same name and namespace in other branches
  1. 8 core/modules/book/book.module \book_node_view()
  2. 9 core/modules/book/book.module \book_node_view()
  3. 10 core/modules/book/book.module \book_node_view()

Implements hook_node_view().

File

modules/book/book.module, line 887
Allows users to create and organize related content in an outline.

Code

function book_node_view($node, $view_mode) {
  if ($view_mode == 'full') {
    if (!empty($node->book['bid']) && empty($node->in_preview)) {
      $node->content['book_navigation'] = array(
        '#markup' => theme('book_navigation', array(
          'book_link' => $node->book,
        )),
        '#weight' => 100,
      );
    }
  }
  if ($view_mode != 'rss') {
    book_node_view_link($node, $view_mode);
  }
}