Table of Contents module

Date: Sat Jun 28 2008 Drupal 6

Introduction

Table of Contents is a new module that adds some really nice new featureitis. You can see it in operation on this here page. It's an exciting new module in that it adds to the navigability of long documents.

Featuritis

The featuritis for this module is to scan page content and find the header tags (H1..H6). It uses the strings in the header tags to create listing of links to those headers. A.k.a. Table of Contents

It does a few nice things in addition like make the ToC collapsible, and add anchor tags to headers.

Use

Install the module as normal.

Go to the Input Formats admin area, and enable the filter.

While you're in Input Formats also make sure to add the H1..H6 tags to the list of allowable tags.

Now, in any node where you want to have a table of contents insert the ToC marker:


<!--tableofcontents-->