Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I like the feature of jquerymenu for books, but i don't mind to use ALL BOOKS.... great plugin, but just for the browse of the current book is not effective. some way to display only the current book i'm reading??? thanks
Comments
Comment #1
nw CreditAttribution: nw commentedThis feature has come up in several issue threads. I reply here only and leave it for the maintainers to deal with house keeping.
It is possible to have a jQuery menu for the current book by preprocessing the block output by the books module. I have done this in my dev environment in the template.php file. Anyone with basic theming knowledge and experience should be able to follow my code hint:
IMHO this solution should be added to the documentation for Advanced Book Blocks.
Comment #2
tlaurent CreditAttribution: tlaurent commentedHi nw,
Thanks for posting this solution, it was very helpful !
I had to make a slight change though to make it working: I had to replace
if ($block->module == 'book')
with
if ($block->module == 'advancedbookblocks')
Comment #3
HansKuiters CreditAttribution: HansKuiters commentedWorks for me too, with the addition from tlaurent.
Additional workflow: you need to put all your books in one ABB, not an ABB for every book.
Comment #4
HansKuiters CreditAttribution: HansKuiters commentedComment #5
rootwork#517314: How to keep block displayed just during its book browsing? marked as a duplicate of this.
Comment #6
georgemastro CreditAttribution: georgemastro commentedThis didn't work for me so I made a little hacking. If it works for other please tell me so I can make a patch.
One note is that I use it only to display the tree and not navigate through it. So this worked like a charm.