Template:ToC: Difference between revisions

From Darkan
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
<div style="float:left; width:18%; margin:0 10px 10px 0;">
{| id="toctemplate" align="{{#switch:{{{align|{{{1|left}}}}}}|right=right|center=center|left|#default=left}}" cellspacing=0 cellpadding=0 style="clear:{{{clear|left}}}; margin-bottom:0.5em; margin-right:1em; float:{{#switch:{{{align|{{{1|left}}}}}}|right=right|center=center|left|#default=left}}; padding:{{#switch:{{{align|{{{1|left}}}}}}|right=0.5em 0 0.8em 1.4em|#default=0.5em 1.4em 0.8em 0}}; background:none; width:{{{width|auto}}};" {{#if:{{{limit|}}}|class="toclimit-{{#expr:{{{limit}}}+1}}"}}
{| id="toctemplate" align="{{#switch:{{{align|{{{1|left}}}}}}|right=right|center=center|left|#default=left}}" cellspacing=0 cellpadding=0 style="clear:{{{clear|left}}}; margin-bottom:0.5em; margin-right:1em; float:{{#switch:{{{align|{{{1|left}}}}}}|right=right|center=center|left|#default=left}}; padding:{{#switch:{{{align|{{{1|left}}}}}}|right=0.5em 0 0.8em 1.4em|#default=0.5em 1.4em 0.8em 0}}; background:none; width:{{{width|auto}}};" {{#if:{{{limit|}}}|class="toclimit-{{#expr:{{{limit}}}+1}}"}}
| __TOC__
| __TOC__
|}
|}


 
</div>


<noinclude>{{/doc}}</noinclude>
<noinclude>{{/doc}}</noinclude>

Revision as of 07:25, 27 January 2024

[view] [edit] [purge] Template documentation

This documentation is transcluded from Template:ToC/doc.

The ToC template aligns the "Table of Contents" in a page. The table may now be able to float at the left or right of a page and the text should wrap around it. This template can improve page layouts in certain cases. It can also force-insert a table of contents in pages where there are not enough sections for an automatic insertion of a "Table of Contents".

Usage

  • {{ToC|align}}
  • {{ToC|align|clear|width|limit}}

Optional parameters

{{ToC
| align = the alignment of the table; defaults to LEFT
| clear = equivalent of placing <br clear=> above the table; defaults to LEFT
| width = the width of the table; defaults to AUTO
| limit = the limit of the sections displayed; the default is no limits
}}