Template:Tochide/Documentation

Template page
Revision as of 17:56, 30 September 2009 by w:c:strategywiki>Najzere (documentation for tochide)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template uses collapsible <div> elements to hide large lists on guide tables of contents. This template is useful for making a more compact, easy to read table of contents that doesn't take up a large amount of space when using the "show/hide" function on Header and Footer Navs. The <div> elements are collapsed by default on every page but the Table of Contents to ensure that users without JavaScript will be able to access a full ToC (by clicking the Table of Contents link in the Header Nav).

Usage

The template takes two parameters:

  1. The title shown in the blue bar at the top.
  2. The hidden contents below.

Please use plain text or links in the title, instead of heading templates (don't use {{h2}} or {{h3}}). In the contents, use normal markup as you would elsewhere on the page, such as the {{col}} template, heading templates or lists. Note that the parameters will have to be explicitly defined if using element attributes or other uses of the equal sign (=). You may encounter this when splitting an ordered list between columns where you need to use the start parameter. In this case you would put 2=contents instead of just the contents without a parameter name.

Examples

{{tochide|Title|Contents}}
Title
{{tochide|Title|2=Contents with an = sign}}
Title