Template:Toclimit



This template inserts a Table of Contents which omits subheadings lower than a certain level. The table obeys the same layout rules as the  magic word. Omitted sections still have section edit links in the article body. The main use for this template is situations where it is advantageous to have section edit links for ease of editing but the table of contents would be too long and cluttered and/or the Tocright template could not be used instead.

Using this
Place the following on a page in the position where the table of contents should be:

Toclimit


 * The template defaults to including only == level 2 == and === level 3 === headers.


 * A different limit can be specified by adding a header level parameter. Possible values for this parameter range from 2-7.

Example

 * 4 allows ==== level 4 ==== headers but omits any subheadings below that from the TOC.

Technical Information

 * The template works by hiding the lower levels with CSS. See MediaWiki:Common.css.
 * This template does not interact well with the Tocright templates.