1 book.module book_node_view(Node $node, $view_mode)

Implements hook_node_view().

File

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

Code

function book_node_view(Node $node, $view_mode) {
  if ($view_mode == 'full') {
    if (!empty($node->book['bid']) && empty($node->in_preview) && config_get('book.settings', 'book_navigation')) {
      $node->content['book_navigation'] = array(
        '#markup' => theme('book_navigation', array('book_link' => $node->book)),
        '#weight' => 100,
        '#attached' => array(
          'css' => array(
            backdrop_get_path('module', 'book') . '/css/book.theme.css',
          ),
        ),
      );
    }
  }

  if ($view_mode != 'rss') {
    book_node_view_link($node, $view_mode);
  }
}