Template:TOC

From Dragon Age Toolset Wiki
Jump to: navigation, search
Contents
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

The TOC template creates a replacement Table of Contents for alphabetical lists:

  • The "Contents" or a custom heading can go on top (default) or the side (side=yes).
  • letters can be omitted and/or merged into ranges: A B C-F G H-K L ...
  • Other options include: align=center, num=yes, top=yes, seealso=yes, etc.

Usage

{{TOC
|name    =
|side    = yes
|align   = center
|nobreak = yes
|top     = yes
|num     = yes
|sym     = yes
|symnum  =
|seealso = yes
|a       =
:
|z       =
}}
<!-- === <span id="A">A</span> ===
-->
<!-- === <span id="B">B</span> ===
-->
<!-- === <span id="C">C</span> ===
-->
<!-- === <span id="D">D</span> ===
-->
<!-- === <span id="E">E</span> ===
-->
<!-- === <span id="F">F</span> ===
-->
<!-- === <span id="G">G</span> ===
-->
<!-- === <span id="H">H</span> ===
-->
<!-- === <span id="I">I</span> ===
-->
<!-- === <span id="J">J</span> ===
-->
<!-- === <span id="K">K</span> ===
-->
<!-- === <span id="L">L</span> ===
-->
<!-- === <span id="K">K</span> ===
-->
<!-- === <span id="K">K</span> ===
-->
<!-- === <span id="M">M</span> ===
-->
<!-- === <span id="N">N</span> ===
-->
<!-- === <span id="O">O</span> ===
-->
<!-- === <span id="P">P</span> ===
-->
<!-- === <span id="Q">Q</span> ===
-->
<!-- === <span id="R">R</span> ===
-->
<!-- === <span id="S">S</span> ===
-->
<!-- === <span id="T">T</span> ===
-->
<!-- === <span id="U">U</span> ===
-->
<!-- === <span id="V">V</span> ===
-->
<!-- === <span id="W">W</span> ===
-->
<!-- === <span id="X">X</span> ===
-->
<!-- === <span id="Y">Y</span> ===
-->
<!-- === <span id="Z">Z</span> ===
-->

Parameters

Parameter Description
name replaces the "Contents" heading with an alternative name, or hide it completely by entering name=no
side places the "Contents" heading on the left side with a colon, instead of the top without one
align align=center aligns the TOC horizontal to the middle of the page; align=right aligns the TOC horizontally to the right of the page (may require <br style="clear:right;"/> after it, depending on page layout)
nobreak no linebreak between the letters and the "See also" link (note: does not affect the heading; use side for that)
top enables the "Top" link; this is only useful if this copy of the TOC is a secondary TOC not at the top of the page, e.g. in the middle of a long glossary
sym enables the "!$@" link for symbolic entries section
num enables the "0-9" link for numeric entries section (create a heading of ==0&ndash;9== for the link to work)
symnum enables the "!-9" link for combined symbolic and numeric entries section (create a heading of ==!&ndash;9== for the link to work)
sep sets the separator between the word-headers (but not the letters), for example &middot; ("·"), &bull; ("•") or &#124; ("|"), etc.
seealso enables link to the "See also" section
a to z disables individual letters that have no entries or creates range links, for example, "X-Z". Use with caution and check regularly to make sure that new entries do not require the removal of these parameters.

Any letter can be omitted (i.e. when it has no entries in the list) by using its lower-case parameter unset, for example, q=, or it can be replaced with an unlinked letter by using its lower-case parameter set to its (upper-case) self, for example, q=Q.

It is sometimes better to create an empty place-holder span (e.g. <span id="Q"/> where the letter's heading would be in the page if it existed, since in most cases it is quite possible that it will come to exist in the future. Using the span-id avoids confusing new users who might not realize the TOC-template has skipped some letters.

The letter-assignment feature can also be used to create range links, for example, x=[[#X-Z|X-Z]]|y=|z=}}.

Examples

{{TOC}}

Contents
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

{{TOC|symnum=yes}}

Contents
!-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

{{TOC|side=yes|j=|q=}}

Contents:
A B C D E F G H I K L M N O P R S T U V W X Y Z

{{TOC|side=yes|j=J|q=Q}}

Contents:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

{{TOC|side=yes|x=[[#X-Z|X-Z]]|y=|z=}}

Contents:
A B C D E F G H I J K L M N O P Q R S T U V W X-Z