function book_node_view

7.x book.module book_node_view($node, $view_mode)

Implements hook_node_view().

File

drupal/modules/book/book.module, line 884
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);
  }
}