DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

toc

Table of Contents (TOC)

The table of contents shows a summary of the page by listing the section headlines in a neat little box usually at the top right corner of the content. This allows users to have a quick look at the page structure and quickly jump to the part of the page they want.

The TOC is only shown if a minimum number of qualifying headlines are present on the page, for more information refer configuration below.

Tips

Turning off TOC

The TOC can be turned off on any single page using the control macro ~~NOTOC~~.

To disable TOC's completely, throughout the wiki, set either maxtoclevel or tocminheads to 0

Don't show page title in TOC

The top page heading, often the page title, can be prevented from appearing in the TOC by setting toptoclevel to 2.

Configuration

Configuration settings exist to control which heading levels should appear in the TOC (toptoclevel, maxtoclevel) and how many of those headings are required for a TOC to be shown on the page (tocminheads).

  • toptoclevel – set the highest level heading to appear in the TOC
  • maxtoclevel – set the lowest level heading to appear in the TOC
  • tocminheads – set the minimum number of qualifying headings required for a TOC to appear

E.g in a wiki with the following settings:

  • toptoclevel = 2, ie. ===== (in an html page this corresponds <h2>)
  • maxtoclevel = 4, ie. === ( in an html page this corresponds to <h4>)
  • tocminheads = 3

A page will need to have at least three headlines of levels 2-4 to be shown with a TOC.

Development

Since Release 2008-05-05, tpl_toc function can be used to show TOC separately from the content.

toc.txt · Last modified: 2017-10-27 13:25 by Aleksandr