Difference between revisions of "Template:Float toc"

From The iPhone Wiki
Jump to: navigation, search
(New page: {| border="0" style="float:right" |- || __TOC__ |}<noinclude> == Purpose == This template floats the table of contents to the right of the page. It is useful on pages with lots of section...)
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| border="0" style="float:right"
+
{| 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__
  +
|-
 
|}<noinclude>
 
|}<noinclude>
 
== Purpose ==
 
== Purpose ==
This template floats the table of contents to the right of the page. It is useful on pages with lots of sections.
+
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.
  +
 
== Usage ==
 
== Usage ==
<nowiki>{{float toc}}</nowiki>
+
<nowiki>{{</nowiki>float toc|left<nowiki>}}</nowiki>
  +
<nowiki>{{</nowiki>float toc|right<nowiki>}}</nowiki>
Result: Above
 

Latest revision as of 20:14, 15 August 2013

Contents

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}}