- Issue created by @w01f
- π«π·France mably
Hi @w01f, thanks for your suggestion.
What do you think of adding a "toc container selector" configuration option allowing to choose on which parent element of the toc we want to apply visibility and stickiness ?
- Merge request !20Issue #3469533 by w01f, mably: Option to sticky parent β (Merged) created by mably
- Assigned to mably
- π«π·France mably
@w01f, could you give a try to this issue's MR that implements this new "toc container selector" option and tell us how it goes?
Here is a screenshot of the new configuration option:
- πΊπΈUnited States w01f
First, wow @mably, thanks for the fast reply.
I was initially thinking using js to find the immediate parent would be better as it wouldn't require managing a specific class on just the parent where toc is used. And I wasn't sure if setting if setting a class/ID might cause cause to load and actions in other places it shouldn't.
That said, let me give your solution a try on two quick use cases and I'll report back what I find!
- Status changed to Needs review
4 months ago 2:50pm 22 August 2024 - πΊπΈUnited States w01f
@mably, I just downloaded and applied the forked module code, but I don't see a configure option on the Extend module page or in the configuration settings for the toc.js block added via Layout Builder.
I'm adding the Toc.js via Layout Builder on an "Article" content type.
- π«π·France mably
Are you sure to have download the module's code corresponding to this issue's MR?
I can definitely see the Toc container field in the block configuration of the layout builder:
- πΊπΈUnited States w01f
Not sure how I downloaded the wrong package before, but just tested and that works beautifully.
- Status changed to RTBC
4 months ago 7:38pm 26 August 2024 - Status changed to Fixed
4 months ago 10:29am 27 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- Issue was unassigned.