Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module integrates Tocbot to automatically generate a table of contents from headings on a page, making long content easier to navigate. It provides a configurable block and can assign unique IDs to headings.

This module provides a wrapper around Tocbot which builds an automatic table of contents (TOC) from headings in an HTML document. This is useful for documentation websites or long informational pages because it makes them easier to scan and navigate.

What this module provides

  • A block is created that will contain the automatic table of contents
  • You can configure the Javascript settings from a Drupal configuration page (such as where on the page to look to grab headings)
  • A minimum heading limit can be set so it won't activate on simpler pages (default 3)
  • Uses css/js from a CDN by default, but you can provide library files if you want to host those locally using the drupal.org/project/libraries module.
  • Tocbot requires ID attributes on your headings to work properly, this module will create automatic ID's for your headings but can be disabled if you want more control or another module already creates ID's.

Demo

Activity

Total releases
3
First release
Apr 2025
Latest release
9 months ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Slowing

Release Timeline

Releases

Version Type Release date
2.0.4 Stable Sep 26, 2025
2.0.3 Stable Sep 24, 2025
2.0.2 Stable Apr 23, 2025