Template:Tochide/Documentation: Difference between revisions

Template page
w:c:strategywiki>Najzere
(documentation for tochide)
 
m (3 revisions imported: Imported from https://strategywiki.org/)
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:


==Usage==
==Usage==
The template takes two parameters:
The template takes one parameter:
# The title shown in the blue bar at the top.
# The title shown in the blue bar at the top.
# The hidden contents below.


Please use plain text or links in the title, instead of heading templates (don't use {{t|h2}} or {{t|h3}}). In the contents, use normal markup as you would elsewhere on the page, such as the {{t|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 <tt>start</tt> parameter. In this case you would put <tt>2=</tt>''contents'' instead of just the contents without a parameter name.
Please use plain text or links in the title, instead of heading templates (don't use {{t|h2}} or {{t|h3}}). In the contents, use normal markup as you would elsewhere on the page, such as the {{t|col}} template, heading templates or lists.


==Examples==
==Examples==
<pre>{{tochide|Title|Contents}}</pre>
<pre>{{tochide|Title}}
{{tochide|Title|Contents}}
Contents
 
{{tochide}}</pre>
<pre>{{tochide|Title|2=Contents with an = sign}}</pre>
{{tochide|Title}}
{{tochide|Title|2=Contents with an = sign}}
Contents
{{tochide}}


<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Latest revision as of 18:28, 28 October 2023

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[edit source]

The template takes one parameter:

  1. The title shown in the blue bar at the top.

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.

Examples[edit source]

{{tochide|Title}}
Contents
{{tochide}}
Title

Contents