Template:Floatingtoc/Documentation: Difference between revisions

Template page
w:c:strategywiki>NajBot
m (category fix, Replaced: [[Category:Template documenation → [[Category:Template documentation)
m (9 revisions imported: Imported from https://strategywiki.org/)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{high-risk}}
{{TemplateStyles|Template:Floatingtoc/styles.css}}
==Usage==
==Usage==
{{t|floatingtoc|float|limit}}
{{t|floatingtoc|float|limit|width}}


* ''float'': Floats the table of contents to either the left or right side of the screen.  Default is to float to the right.
* ''float'': floats the table of contents to either the left or right side of the screen.  Default is to float to the left.
* ''limit'': Used to show only the higher levels of the table of contents.
* ''limit'': used to show only the higher levels of the table of contents.
* ''width'': puts a limit on the horizontal width of the div. Useful for FAQ pages with sentence-long headers.


This template floats the table of contents on the right-hand side of the page. Don't use it in conjunction with another floating template such as [[Template:infobox|infobox]] as they will collide in a rather unsightly manner. In such cases, leave this (rather than the other) template out, and let the page have a normal table of contents.
This template floats the table of contents on the right-hand side of the page. Don't use it in conjunction with another floating template such as {{t|Game}} as they will collide in a rather unsightly manner. In such cases, leave this (rather than the other) template out, and let the page have a normal table of contents.<noinclude>


<noinclude>[[Category:Template documentation|F]]</noinclude>
[[Category:Template documentation]]</noinclude>

Latest revision as of 18:24, 28 October 2023

High-risk
High-risk

This high-risk template or image has been protected indefinitely. It is widely used and is at significant risk of vandalism. If you would like to edit this page, bring it up on the talk page, contact a sysop, or bring it up on Discord. Protection is not an endorsement of the current version, which is inevitably the wrong version.

Usage[edit source]

{{floatingtoc|float|limit|width}}

  • float: floats the table of contents to either the left or right side of the screen. Default is to float to the left.
  • limit: used to show only the higher levels of the table of contents.
  • width: puts a limit on the horizontal width of the div. Useful for FAQ pages with sentence-long headers.

This template floats the table of contents on the right-hand side of the page. Don't use it in conjunction with another floating template such as {{Game}} as they will collide in a rather unsightly manner. In such cases, leave this (rather than the other) template out, and let the page have a normal table of contents.