- Issue created by @adam_b
- Assigned to bwong
- πΊπΈUnited States bwong
This may be a little harder to do because the Book module's function is used to generate the table of contents. Figuring out which element is the current page make require replicating and reworking that function. I am looking at what needs to be done to see what is required.
- π¬π§United Kingdom adam_b
Thanks for responding, bwong
If it's any help, the core "Book navigation" block does provide this:
<li class="menu-item menu-item--active-trail li-2" data-once="ul">
And just to give you an idea why it's needed, I've uploaded a partial screenshot of one book menu
- d56ca596 committed on 8.x.-1.x
Added enchancement #3390812. Highlight current page in TOC
- d56ca596 committed on 8.x.-1.x
- πΊπΈUnited States bwong
For some reason that does not follow through so I added my own. Probably need to go back and figure out how they did it but 1.12 does this. The class is book-blocks-active.
- Status changed to Fixed
about 1 year ago 12:22am 4 October 2023 - π¦πΊAustralia kualee
Hi @bwong thanks for this great little module. It helps me saving tons of hours in reinventing the wheels.
I would like to check about version 1.12 and the new class "book-blocks-active", is this meant to show on child page of a book?
I installed the module and dropped TOC block in my content but I cant see this new class in my menu at all.
Greatly appreciate your help!
- πΊπΈUnited States bwong
1.13 has the support in TOC. I had only implemented it in the Edit block TOC.
- π¦πΊAustralia kualee
@bwong you are a truly legend! It's all working as intended