This project is not covered by Drupal’s security advisory policy.
A powerful yet user friendly module that automatically creates a context specific index or table of contents (TOC) for long pages (for any node types).
Built from the ground up and with Wikipedia in mind, the table of contents by default appears before the first heading on a page. This allows the author to insert lead-in content that may summarise or introduce the rest of the page. It also uses a unique numbering scheme that doesn't get lost through CSS differences across themes.
Includes an administration settings page where you can customise settings like display position, define the minimum number of headings before an index is displayed, other appearance, and more. For power users, expand the advanced options to further tweak its behaviour - eg: exclude undesired heading levels like h5 and h6 from being included; disable the output of the included CSS file; adjust the top offset and more.
You can select which node types should have table of contents from module settings, so enable the ones you want.
Installation
- Download and install the Super TOC module into your respective sites directory (sites/all/modules).
- Enable the module in admin/build/modules
- Download the Smooth Scroll plugin. Make sure to use the 1.4.10 branch since that will stay backwards compatible with older jQuery version, like the ones included with Drupal.
Download Smooth Scroll plugin 1.4.10
Unpack and rename the plugin directory to "jquery-smooth-scroll" and place it inside the "sites/all/libraries" directory. Make sure the path to the plugin file becomes: "sites/all/libraries/jquery-smooth-scroll/jquery.smooth-scroll.min.js"
- Visit admin/config/content/super_toc and set your configuration options, as well as what node types you'd like table of contents to be present on.
Known Limitations
Nodes must have a body field with greater than the configured # of words in order to trigger TOC creation. So, if your node type doesn't have a body field (if you are using CCK to define your own content fields) no insertion will take place. Removal of this limitation has been requested as a feature (see #2780249: Support content type without body field). If you want to see this feature added, please visit that issue and register your vote by leaving a '+1' comment.
D7 Dependencies
- Drupal 7.22 or later
- Libraries API 2.x
- Entity API
- Transliteration
D8 Port
A port to Drupal 8 is underway, keep track of #2502615 to follow development.
Project information
- Project categories: Content editing experience, Content display
1 site reports using this module
- Created by dillix on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.




