By gwatzn on
Hello... I'm wondering if anyone can help me with an issue I'm having where all I want to do is show the complete outline of a book hierarchy in the content view, with all the child and leaf nodes listed out as clickable links? Thanks for any help.
-G
Comments
booktree?
Hi. Maybe this is what you're looking for: project/booktree
thanks for the hint...
this module definitely helps to achieve part of what I'm trying to do, though I wish it had some more configuration options. Luckily the module isn't overly huge and I might be able to customize it for my needs. I just wish that there was a way to set a flag within the content of a book page to make the entire navigation tree of the child pages expand, basically enabling a full-fledged table of contents underneath the text within the top-level page in a book.
Hello gwatzn, have you
Hello gwatzn, have you managed to do it?
--
www.hakeem-sy.com
Solution
Ok I have solution to this. You have to enable the booktree.module first in order for this to work:
Add this line of code to the core book.module, under the book_children($book_link) function:
And that's all. You should be able to view the expanded version.
Separate Module
How would you incorporate this into a separate module from Book? I don't want to patch Book because it is a core module that is susceptible to change upon upgrading Drupal. I've never made a module before so any pointers would be appreciated.