Improving on a patch
cd drupal
wget http://drupal.org/files/issues/book-589440-38.patch
patch -p0 < book-589440-38.patch
drush dl devel
Tip: The patch command needs the angle bracket (alligator mouth) to eat the patch file!
admin/modules
Control/Command + f, type "devel" and we press enter a couple times to get to the Development section of our modules page.
Enable Devel and Devel Generate modules.
admin/config/development/generate/content
$tree = book_menu_subtree_data($node->book);
$tree = array_shift($tree); // Do not include the book item itself.
debug($tree);
Debug: array ( 'link' => array ( 'menu_name' => 'book-toc-2', 'mlid' => '466', 'plid' => '380', 'link_path' => 'node/114', 'router_path' => 'node/%', 'link_title' => 'Facilisi Enim Saepius', 'options' => array ( ), 'module' => 'book', 'hidden' => '0', 'external' => '0', 'has_children' => '0', 'expanded' => '0', 'weight' => '-15', 'depth' => '2', 'customized' => '0', 'p1' => '380', 'p2' => '466', 'p3' => '0', 'p4' => '0', 'p5' => '0', 'p6' => '0', 'p7' => '0', 'p8' => '0', 'p9' => '0', 'updated' => '0', 'nid' => '114', 'bid' => '2', 'load_functions' => 'a:1:{i:1;s:9:"node_load";}', 'to_arg_functions' => '', 'access_callback' => 'node_access', 'access_arguments' => 'a:2:{i:0;s:4:"view";i:1;i:1;}', 'page_callback' => 'node_page_view', 'page_arguments' => 'a:1:{i:0;i:1;}', 'delivery_callback' => '', 'title' => 'Facilisi Enim Saepius', 'title_callback' => 't', 'title_arguments' => '', 'type' => '4', 'in_active_trail' => false, 'access' => true, 'href' => 'node/114', 'localized_options' => array ( ), ), 'below' => array ( ), ) in _book_add_form_elements() (line 509 of /home/ben/code/dgd7/drupal/modules/book/book.module).
debug($node->book);
Debug: array ( 'mlid' => '466', 'nid' => '114', 'bid' => '2', 'menu_name' => 'book-toc-2', 'plid' => '380', 'link_path' => 'node/114', 'router_path' => 'node/%', 'link_title' => 'Facilisi Enim Saepius', 'options' => array ( ), 'module' => 'book', 'hidden' => '0', 'external' => '0', 'has_children' => '0', 'expanded' => '0', 'weight' => '-15', 'depth' => '2', 'customized' => '0', 'p1' => '380', 'p2' => '466', 'p3' => '0', 'p4' => '0', 'p5' => '0', 'p6' => '0', 'p7' => '0', 'p8' => '0', 'p9' => '0', 'updated' => '0', 'href' => 'node/114', 'title' => 'Facilisi Enim Saepius', 'original_bid' => '2', 'parent_depth_limit' => 8, ) in _book_add_form_elements() (line 509 of /home/ben/code/dgd7/drupal/modules/book/book.module).
Comments
Post new comment