The iPhone Wiki is no longer updated. Visit this article on The Apple Wiki for current information. |
Difference between revisions of "Template:Float toc"
m (well that didnt workl) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {| border="0" style="float:{{{1<noinclude>|right</noinclude>}}}; |
+ | {| border="0" style="float:{{{1<noinclude>|right</noinclude>}}}; <!-- |
+ | -->{{#switch: {{{1<noinclude>|right</noinclude>}}} |
||
+ | | left = margin: 5px 5px 0 0; |
||
+ | | right = margin: 0 0 5px 5px; |
||
+ | | #default = margin: 5px; |
||
+ | }}" |
||
|- |
|- |
||
|| __TOC__ |
|| __TOC__ |
||
Line 6: | Line 11: | ||
== Purpose == |
== Purpose == |
||
This template floats the table of contents to the right of the page. It is useful on pages with lots of sections or pages. It can also be useful for pages with a long summary as the table of contents is always placed below the summary and above the first heading unless an explicit <code>__<nowiki/>TOC__</code> or <code>__<nowiki/>NOTOC__</code> is placed. |
This template floats the table of contents to the right of the page. It is useful on pages with lots of sections or pages. It can also be useful for pages with a long summary as the table of contents is always placed below the summary and above the first heading unless an explicit <code>__<nowiki/>TOC__</code> or <code>__<nowiki/>NOTOC__</code> is placed. |
||
− | |||
− | If you float the table of contents to the left, be sure to place a {{<nowiki/>[[Template:clear|clear]]}} below the summary above the first heading (even if the summary is ridiculously long. If you have a good reason to no use the {{<nowiki/>[[Template:clear|clear]]}} template, leave the reasoning in a comment block (<code><!-- derp reason --></code>) in place of the template. |
||
== Usage == |
== Usage == |
||
+ | <nowiki>{{</nowiki>float toc|left<nowiki>}}</nowiki> |
||
− | === Right === |
||
− | {{ |
+ | <nowiki>{{</nowiki>float toc|right<nowiki>}}</nowiki> |
− | Result: Above |
||
− | === Left === |
||
− | {{float <nowiki/>toc|left}} |
||
− | Result: TOC floated to the left of the summary |
||
− | </noinclude> |
Latest revision as of 20:14, 15 August 2013
Purpose
This template floats the table of contents to the right of the page. It is useful on pages with lots of sections or pages. It can also be useful for pages with a long summary as the table of contents is always placed below the summary and above the first heading unless an explicit __TOC__
or __NOTOC__
is placed.
Usage
{{float toc|left}} {{float toc|right}}