Simple TOC creates a Table of Contents generated from node long-text fields. The TOC is generated 'on the fly' via DOM manipulation, without input from content-author(s) or viewers. Simple TOC has many display options, such as in a block, or attaching directly to the field content.

Configuration

Set-up is per content type and is enabled by selecting a long text field to apply the TOC modifications to. Upon node loads, the module will parse the selected field and modify any HTML headers with organised ID numbers. A TOC 'field' is added to the nodes array, enabling the TOC to be displayed anywhere (ie used by other modules).

Options

  • Attaching the TOC to the start and/or end of the selected field.
  • Outputting the TOC as OL, UL or DIV.
  • Make the TOC collapsible by utilising Ctools features.
  • Giving the TOC a customisable HTML heading.
  • Adding "Back to Top" links before and/or after the content following a HTML heading.
  • Customising the heading anchors with tokens.

Display Methods

In addition to inserting the TOC into the nodes content, a Block, Display Suite field and Panel Pane are provided. The TOC also features sufficient CSS to enable different display configurations. This gives site admin's a lot of options for when, where and how to display the TOC.

Dependencies

Whilst there are no strict dependencies, the module will provide no functionality without core node being enabled.

Compatibility

Simple TOC works when overriding node_view with the Page Manager feature of Chaos Tools.
Simple TOC works with, and provides output for, Display Suite.
Simple TOC has been tested to work with Revisioning module (but not thoroughly).

Difference to Other Modules

Comparison moved to its own page: https://drupal.org/node/2278811

Note: Many of the TOC modules in the comparison were created in the time this project was a sandbox, and this module may be redundant (but works).

Simple TOC (this module) acts upon the field during node_load, to ensure the correct data is passed to all modules. It manipulates the field via the DOM. The module is configured by site-administrator and is per content type. Many options are provided to customise the output, which is cached by the module. No interaction/configuration is required by the content-author or viewer.


Support: I (neRok) have moved on from Drupal / PHP, so will not be maintaining this module. If you would like to take it over, let me know.

Project information

  • caution Seeking new maintainer
    The current maintainers are looking for new people to take ownership.
  • caution No further development
    No longer developed by its maintainers.
  • chart icon18 sites report using this module
  • Created by neRok on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases