Closed herbdool closed 3 years ago
Thanks for trying Tocbot! A "Back to top" link sounds like a useful option, I'm however not sure how to realize it. Thoughts:
One solution could be to get the option in the Tocbot library. Looking at https://github.com/tscanlin/tocbot, I didn't find this feature. I've also scanned the issue queue but not thoroughly. Not sure if it's realistic to get the feature added in the library.
Or are you maybe up to provide a library independent solution for the Tocbot module?
As a third approach, maybe build a small module which just provides the Back to top links.
Variation of 3: extend https://github.com/backdrop-contrib/permalink_filter or https://github.com/backdrop-contrib/back_to_top to provide the option. (Using the Back to Top module could also be a workaround.)
Thanks for looking at this @olafgrabienski. Probably back_to_top module is the best option here. The tocbot library seems pretty focused so that makes sense.
I'm trying this module out with a client. The design doesn't have a sidebar so the tocbot block is at the top of the content. Once someone clicks a link in the table of contents and goes to the relevant heading, there's no easy way to go back to the TOC. Perhaps if there was a Back to top link after each heading as an option, this would help.