Line 1: |
Line 1: |
− | ;Description
| + | ==Description== |
− | :This template will float the article's table of contents to the right. It will also force a ToC when/where it would not normally be found.
| + | This template will force the page's table of contents to appear and align it the right. |
− | :Use it only when needed.
| |
− | ;Syntax
| |
− | :Type <code><nowiki>{{Template:Tocright}}</nowiki></code>
| |
| | | |
− | ===Parameters (optional)=== | + | ==Usage== |
| + | {{TOC right}} |
| + | Add <code><nowiki>{{TOC right}}</nowiki></code> (see result at right). |
| | | |
− | ;clear: Sets the [[wikipedia:Cascading Style Sheets|CSS]] clear property, which forces this float underneath the side specified with this attribute. So, <code>clear=left</code> (which is the default) will place the element after all the left floating elements before it. Options are <code>left</code>, <code>right</code>, <code>both</code>, or <code>none</code>.
| + | You can customise the template with these optional parameters. It's best not to use these in most cases, to keep TOCs consistent. |
| | | |
− | ;width: Set the CSS width.
| + | {| class="wikitable" |
| + | |- |
| + | ! parameter |
| + | ! valid values |
| + | ! description |
| + | |- |
| + | | <tt>clear</tt> |
| + | | <tt>left</tt><br /><tt>right</tt><br /><tt>both</tt><br /><tt>none</tt> |
| + | | Forces any floating content on the given side to move down below the TOC. The default value is <tt>left</tt>. |
| + | |- |
| + | | <tt>width</tt> |
| + | | ''any positive integer'' |
| + | | Set the width of the box. |
| + | |- |
| + | | <tt>classes</tt> |
| + | | ''any CSS classes'' |
| + | | Change the appearance with CSS classes. Supported classes: |
| + | * <tt>noautonum</tt>: hide the section numbers. |
| + | |} |
| | | |
− | ;limit: Limits the depth of subheadings shown. For instance using <code>limit=4</code> will hide the fourth level and deeper subheadings in the hierarchy. And <code>limit=2</code> will hide all subheadings leaving only the main headings. This is implemented as a CSS class in the MediaWiki:Common.css.
| + | <noinclude>[[Category:Template documentation]]</noinclude> |
| + | <includeonly> |
| + | [[Category:General wiki templates]] |
| | | |
− | <includeonly>[[Category:General wiki templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
| + | [[de:Vorlage:{{PAGENAME}}]] |
− | __notoc__
| |
− | <includeonly>[[de:Vorlage:{{PAGENAME}}]]
| |
| [[es:Plantilla:{{PAGENAME}}]] | | [[es:Plantilla:{{PAGENAME}}]] |
| [[ja:テンプレート:{{PAGENAME}}]] | | [[ja:テンプレート:{{PAGENAME}}]] |
| [[pt:Predefinição:{{PAGENAME}}]] | | [[pt:Predefinição:{{PAGENAME}}]] |
| [[ru:Шаблон:{{PAGENAME}}]] | | [[ru:Шаблон:{{PAGENAME}}]] |
− | [[zh:Template:{{PAGENAME}}]]</includeonly> | + | [[zh:Template:{{PAGENAME}}]] |
| + | </includeonly> |