Template:Toc

From PZwiki
Notebook.pngTemplate Documentation

This template forces the auto-generated Table of Contents for an article to appear floated to the left (default) or right side of the page, in order to improve article layout.

Usage

Insert {{toc}} at the point in the article where you want the top of the Table of Contents box to appear. This should usually be after the text of the lead section. Use with {{clear}} to prevent collision with text; use the clear parameter (see below) to prevent collision with images.

  • Avoid placing the TOC in a visually poor location. Crossing a section division is probably a poor idea.

Parameters (optional)

clear
Sets the CSS clear property, which forces this float underneath the side specified with this attribute. So, |clear=left (which is the default) will place the element after all the left floating elements before it. Options are left, right, both or none.
width
Set the CSS width.
limit
Limits the depth of subheadings shown. For instance, using |limit=4 will hide the fourth level and deeper subheadings in the hierarchy. And |limit=2 will hide all subheadings leaving only the main headings. This is implemented as a CSS class in the MediaWiki:Common.css.

How to translate

This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:

  1. Create a subpage of this template with the language code of the language you want to translate to.
  2. Copy the code wrapped in the <noinclude> tag in this template into the page you created.
    {{Translation guide}} template should be removed from the translated documentation.
  3. Translate the page according to the translation requirements of normal pages.

See also

Editors can experiment in this template's sandbox.