From StrategyWiki, the video game walkthrough and strategy guide wiki
Jump to navigation Jump to search

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


This template is for making a more horizontal ToC on guide pages that have numerous headings and for which the automatic ToC is extremely long.

Usage[edit]

{{flattoc|position|columns|<width=toc width>|heading name|list|list|list...}}

These parameters must be in this order. It is not necessary to put __NOTOC__ on the page first.

  1. position (start, middle, end): This is a keyword for where in the ToC this heading goes. For the first ==Level 2 Heading== use start, for any of the middle headings use middle, and for the last heading in the ToC use end.
    • width= (#px): This is the only named parameter. Only use it with the start position. It is the minimum width of the ToC, so that the "show/hide" link doesn't overlap the heading title when its content is hidden. If any links in the list have a space in them, you can use this to force the ToC bigger so the links don't wrap to another line and look bad.
  2. columns (1-10): The number of columns (maximum of 10) under the heading. This will set what percentage of the overall ToC is given to each column, so if you say "5" here, it expects 5 lists and alots 20% width to each one.
  3. heading name: This is the name of the ==Level 2 Heading== under which you want to create a list split into multiple columns.
  4. list: This is where a <br /> delimited list of ===Level 3 Headings=== goes. Put as many of these in as the number specified for columns, up to 10.
  • One heading
    • {{flattoc|start|columns|width=#px|heading name|list|list...}}
    • {{flattoc|end}}
  • Two headings
    • {{flattoc|start|columns|width=#px|heading name|list|list...))
    • {{flattoc|end|columns|heading name|list|list...}}
  • Three plus headings
    • {{flattoc|start|columns|width=#px|heading name|list|list...}}
    • {{flattoc|middle|columns|heading name|list|list...}}
    • ...
    • ...
    • {{flattoc|end|columns|heading name|list|list...}}

Example[edit]

  {{flattoc|start|3|width=600px
    |[[#First heading|First heading]]
    |[[#col 1 item 1|col 1 item 1]]<br />[[#col 1 item 2|col 1 item 2]]<br />[[#col 1 item 3|col 1 item 3]]
    |[[#col 2 item 1|col 2 item 1]]<br />[[#col 2 item 2|col 2 item 2]]<br />[[#col 2 item 3|col 2 item 3]]
    |[[#col 3 item 1|col 3 item 1]]<br />[[#col 3 item 2|col 3 item 2]]<br />[[#col 3 item 3|col 3 item 3]]}}
  {{flattoc|middle|5
    |[[#Middle heading|Middle heading]]
    |[[#col 1 item 1|col 1 item 1]]<br />[[#col 1 item 2|col 1 item 2]]<br />[[#col 1 item 3|col 1 item 3]]
    |[[#col 2 item 1|col 2 item 1]]<br />[[#col 2 item 2|col 2 item 2]]<br />[[#col 2 item 3|col 2 item 3]]
    |[[#col 3 item 1|col 3 item 1]]<br />[[#col 3 item 2|col 3 item 2]]<br />[[#col 3 item 3|col 3 item 3]]
    |[[#col 4 item 1|col 4 item 1]]<br />[[#col 4 item 2|col 4 item 2]]<br />[[#col 4 item 3|col 4 item 3]]
    |[[#col 5 item 1|col 5 item 1]]<br />[[#col 5 item 2|col 5 item 2]]<br />[[#col 5 item 3|col 5 item 3]]}}
  {{flattoc|middle|5
    |[[#Middle heading|Middle heading]]
    |[[#col 1 item 1|col 1 item 1]]<br />[[#col 1 item 2|col 1 item 2]]<br />[[#col 1 item 3|col 1 item 3]]
    |[[#col 2 item 1|col 2 item 1]]<br />[[#col 2 item 2|col 2 item 2]]<br />[[#col 2 item 3|col 2 item 3]]
    |[[#col 3 item 1|col 3 item 1]]<br />[[#col 3 item 2|col 3 item 2]]<br />[[#col 3 item 3|col 3 item 3]]
    |[[#col 4 item 1|col 4 item 1]]<br />[[#col 4 item 2|col 4 item 2]]<br />[[#col 4 item 3|col 4 item 3]]
    |[[#col 5 item 1|col 5 item 1]]<br />[[#col 5 item 2|col 5 item 2]]<br />[[#col 5 item 3|col 5 item 3]]}}
  {{flattoc|end|3
    |[[#Last heading|Last heading]]
    |[[#col 1 item 1|col 1 item 1]]<br />[[#col 1 item 2|col 1 item 2]]<br />[[#col 1 item 3|col 1 item 3]]
    |[[#col 2 item 1|col 2 item 1]]<br />[[#col 2 item 2|col 2 item 2]]<br />[[#col 2 item 3|col 2 item 3]]
    |[[#col 3 item 1|col 3 item 1]]<br />[[#col 3 item 2|col 3 item 2]]<br />[[#col 3 item 3|col 3 item 3]]}}

Contents