Based on original AutoTOC plugin by Gert Hengeveld
This Cotonti plugin automatically generates a Table Of Contents for any page. HTML heading tags are extracted and listed in a tree. The page body is modified to include anchors in source HTML.
#1. Features of new AutoTOC
- Fixed bug with output empty TOC on some pages
- Fixed GHengeveld/AutoTOC#1 (wrong numbering on same titles)
- Now used canonical URL for TOC
- Customizing and overriding TOC display style via resource strings
- Added configurable class and prefix for TOC item
- Allow TOC elements with attributes
- Allow unlimited nesting
Simply upload the plugin folder to your /plugins directory and enable the plugin in your Administration panel.
The plugin has some configurable setting. You can configure the HTML tags that should be included in the TOC. Default value is h2,h3. (Nesting is now ot limited to 2 levels.)
Also you can change class and prefix for TOC item.
Plugin page on GitHub https://github.com/macik/cot-autotoc-2/