Changes

Jump to navigation Jump to search
no edit summary
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>{{t|tocright}}</code>
     −
===Parameters (optional)===
+
==Use==
 +
{{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
 +
|-
 +
|
 +
| <samp>noautonum</samp>
 +
| Pass these flags as the first argument, like <code><nowiki>{{TOC right|noautonum}}</nowiki></code>. Possible flags:
 +
* <samp>noautonum</samp>: hide the section numbers.
 +
|-
 +
| <samp>clear</samp>
 +
| <samp>left</samp><br /><samp>right</samp><br /><samp>both</samp><br /><samp>none</samp>
 +
| Forces any floating content on the given side to move down below the TOC. The default value is <samp>right</samp>.
 +
|-
 +
| <samp>width</samp>
 +
| ''any positive integer''
 +
| Set the width of the box.
 +
|}
   −
;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]].
+
<includeonly>{{Addlanglinks}}[[Category:Templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
 
  −
<includeonly>[[Category:General wiki templates|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
  −
__notoc__
 
107,444

edits

Navigation menu