Community Central

September comes to a close with This Month at Fandom, including cool data trends, Editors of the Month, and a summary of important updates you may have missed.

READ MORE

Community Central
Advertisement
Community Central

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 editor 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 here.

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 alphabetized 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 here 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 will save your preference and do the same on the next page you visit.

Sticky TOC

The table of contents is available anywhere on the page through a sticky button at the top left of the article page.

Sticky Table of Contents button.png

See also

Further help and feedback

Advertisement