soo_toc Page 2 of 3

Example usage

Summary:

The soo_toc Textpattern plugin in action

Article Contents


(This table of contents was, naturally, generated by using <txp:soo_toc />.)

Overview

This article is an example of soo_toc in action.

How-to

This article uses Textile for HTML generation; its source looks like this:

 h2(#overview). Overview

 This article is an example of soo_toc in action.

 h2(#how-to). How-to

 This article uses Textile for HTML generation; its source looks like this:

 ...

Levels

This sub-section’s heading is

h3(#levels). Levels

Note how its listing in the TOC is nested.

Heading IDs

This sub-section’s heading is lacking an ID:

h3. Heading IDs

So it doesn’t appear in the TOC.

Relative URLs

This sub-section’s heading does have an ID:

h3(#relative). Relative URLs

So it appears in the TOC. If you look at this page’s HTML source, you’ll see that the TOC produces relative URLs. This is soo_toc’s default; you can override this with the full_url attribute.

Posted 2008-01-29 (last modified 2009-09-20)