Difference between revisions of "Template:TOC"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Allows custom TOC placement)
 
m (*renamed Parameter Table to Parameter table;)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="clear: {{{clear|both}}}; margin-bottom: .5em; float: {{{align|none}}}; {{#ifeq: {{lc:{{{align|}}}}} | right | margin-left:2.5em; | {{#ifeq: {{lc:{{{align|}}}}} | left | margin-right:2.5em; | <!-- align=none --> }} }} width: {{{width|auto}}};">__TOC__</div>
+
<div style="clear: {{{clear|both}}}; margin-bottom: .5em; float: {{{align|none}}}; {{#ifeq: {{lc:{{{align|}}}}} | right | margin-left:2.5em; | {{#ifeq: {{lc:{{{align|}}}}} | left | margin-right:2.5em; | <!-- align=none --> }} }} width: {{{width|auto}}};">__TOC__</div><noinclude>
<noinclude>
+
Allows customization of the table of contents placement.
Allows customization of the Table of contents placement.
 
  
Parameters are:
+
{{Parameter table|name=text|parameters=
 
+
{{Parameter row|align|Floats the TOC if isn't set to <tt>none</tt>. Other values are <tt>left</tt> and <tt>right</tt>.|<tt>none</tt>}}
''align'' - "none" (default), "left" or "right" => Makes the TOC float
+
{{Parameter row|width|The width in pixels. Determine automatically the width if set to <tt>auto</tt>.|<tt>auto</tt>}}
 
+
{{Parameter row|clear|Clears the TOC if there was already something floating. Can be set to <tt>both</tt>, <tt>left</tt> and <tt>right</tt>.|<tt>both</tt>}}
''width'' - "auto" (default) or width size in px
+
}}
 
+
[[Category:Templates]]</noinclude>
''clear'' - "both" (default), "left" or "right"
 
</noinclude>
 

Latest revision as of 12:14, 19 December 2014

Allows customization of the table of contents placement.

Name Optional Description Default
align Yes Floats the TOC if isn't set to none. Other values are left and right. none
width Yes The width in pixels. Determine automatically the width if set to auto. auto
clear Yes Clears the TOC if there was already something floating. Can be set to both, left and right. both