Template:Floatingtoc: Difference between revisions

Template page
w:c:strategywiki>Notmyhandle
(increased margin-left/right to 2em to avoid bulleted lists from crossing border when floated left)
w:c:strategywiki>Prod
(remove float parameter, simplify margin, make default float=left due to conflict with square ad)
Line 1: Line 1:
<div style="float:{{{1|{{{float|right}}}}}};margin-bottom:.5em;margin-{{#ifeq:{{{1|{{{float|right}}}}}}|right|left|right}}:2em;margin-top:.5em;{{#if:{{{width|}}}|width:{{{width}}};}}" {{#if:{{{2|{{{limit|}}}}}}|class="toclimit-{{{2|{{{limit}}}}}}"}}>__TOC__</div><noinclude>
<div style="float:{{{1|left}}};margin:.5em 2em;margin-{{{1|left}}}:0;{{#if:{{{width|}}}|width:{{{width}}};}}" {{#if:{{{2|{{{limit|}}}}}}|class="toclimit-{{{2|{{{limit}}}}}}"}}>__TOC__</div><noinclude>
{{Documentation}}
{{Documentation}}


[[Category:Templates|F]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 21:22, 19 February 2020

This page has been transcluded from Template:Floatingtoc/Documentation.


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

{{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.