Log in


From PathfinderWiki
Template documentation (for the above template, sometimes hidden or invisible)

The {{TOC}} template allows you to customize the placement, appearance, and behavior of a table of contents (TOC) within an article. You do not need to use this template to show a table of contents on a page with more than three second-level headings as it appears automatically, nor do you need to use this template to force a standard TOC to appear at a specific point in the article (use the __TOC__ magic word) or prevent it from appearing (__NOTOC__).

MediaWiki logo.svg

This page uses content from The original article was at Template:TOC. The list of authors can be seen in the page history. The text of is available under the Creative Commons Attribution-ShareAlike License.


| clear =
| align = 
| width = 
| class = 
| style = 


All parameters are optional, and the default values mimic the normal TOC behavior. Using {{TOC}} by itself should result in the same behavior as using the __TOC__ magic word.

Sets the TOC's CSS clear attribute. The default value is none.
Sets the TOC's CSS float attribute. The default value is none. Valid values are none, left, and right.
Sets the TOC's CSS width attribute. The default value is auto.
Sets the TOC's CSS class. The default value omits the class attribute from the <div> tag that this parameter wraps around the TOC.
Adds additional inline CSS styles to the wrapping <div> tag. No styles are added by default.

Modifying the TOC

This template makes it easy to customize the TOC in flexible ways.

Wrap article text around the TOC

Set the float attribute to left or right to move the TOC and wrap the article's text around it. This is the equivalent of templates like {{TOC left}}.

Change the TOC's width

By default, the TOC is as wide as the text within it. You can manually set the TOC's width by using the width parameter. For instance, a width value of 50% will cause the TOC to take up half the width of the article body.

Choose which heading levels the TOC displays

By default, the TOC displays headings up to three levels deep (headings wrapped in four equals signs, such as ==== Heading ====). You can limit this by applying a toclimit CSS class.

For example:

| class = toclimit-2

limits the TOC to two levels.

Visit Template:TOC/doc to edit this text! (How does this work?)