1 book.module book_init()

Implements hook_init().

Adds the book menu to the list of menus used to build the active trail when viewing a book page.

File

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

Code

function book_init() {
  if (($node = menu_get_object()) && !empty($node->book['bid'])) {
    $active_menus = menu_get_active_menu_names();
    $active_menus[] = $node->book['menu_name'];
    menu_set_active_menu_names($active_menus);
  }
}