FANDOM


Screen shot 2012-03-30 at 2.10.53 PM

An extensive TOC from MLP Wiki

Any article with four or more headings will automatically generate a table of contents, henceforth abbreviated as a "TOC".

Positioning the TOC

The TOC automatically appears just before the first heading. This can be changed in source mode by typing the magic word, "__TOC__" (with two underscores on each side of the word "TOC"). This will allow you to place it in a specific point on a page. Alternatively __TOC__ and __FORCETOC__ can be used to force the TOC to show on a page with fewer than three headings.

Hiding the TOC

Type __NOTOC__ anywhere on a page to remove the TOC. This is often used for aesthetic reasons or on a community's main page.

Floating table

The TOC can be moved to a floating table on the right side by using the {{tocright}} template. This template exists on most wikis but can also be copied from Community Central.

A custom TOC

If you don't want the usual format of the TOC, you can disable the automatic TOC using __NOTOC__ and then add a manual TOC instead. This is often done to link to alphabetised sections. For example, if you want to link to 26 sections lettered A to Z, you can use a Compact TOC which is a special template used instead of the standard TOC.

You can copy the Compact TOC template from Community Central to your wiki if you want to use this. Here's how it looks:

Contents: Top - 0–9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


Notes

Multiple TOCs on one page

If __TOC__ is used multiple times, only the first occurrence causes a TOC to appear. If you want extra ones, you will need to add them manually. This can be done by using a template such as CompactTOC.

Showing and hiding the TOC

You can click the show/hide link to expand or collapse the TOC. By default, logged in users will see the TOC while unregistered users will see the TOC collapsed. When you click show or hide, the wiki save your preference and do the same on the next page you visit.

See also

Further help and feedback

Community content is available under CC-BY-SA unless otherwise noted.