User guides for PizazzWP blocks and plugins for Headway and WordPress
Swiss Army Block User Guide

Using the Table of Contents block

The Table of Contents block enables you to create a list of links to elements on the currently viewed page, such as post headings. This is useful for long pages, such as a blog or newspaper front page. Soemtimes users are reluctant to scroll down, so content can go unread. A table of contents of the page provides another way to prompt them to view all your content.

Example

wpid1097-media_1373639526502.png

This example shows a table of contents that appears when hovering over its header. The primary links are the block titles, and the secondary ones are the post titles.

Block options

wpid1098-media_1373639680306.png

Several options are available to control the way the TOC block works. TOC blocks can be shown always, only on click, or only on mouse over.

Most important among the settings is the “Elements”. This is where you choose what elements to use for the links. To use more than one, separate them with a comma.

If there’s any links that you want to exclude from showing, then enter their identiers in the “Exclusions”.

These exclusions are the class names SAB Table of Contents creates for each element that it wraps in a span tag. It is the title text with any non-alphanumeric characters removed, and spaces replaced with dashes. Use the browser inspector if you are having trouble identifying them. (See below image, highlighted in yellow) The leading dot is not required. It is not the link itslef, but the original item on the page the link points to.

wpid1100-media_1373640265065.png

Styling

wpid1099-media_1373639725570.png

Look in the Visual Editor, Design Mode to style various elements