Template:Tochide: Difference between revisions

Template page
w:c:strategywiki>Prod
(converting to subtoc style template)
w:c:strategywiki>Prod
(mw-collapsible)
Line 1: Line 1:
{{#if:{{{1|}}}|<div class="NavFrame" style="border:none"><div class="NavHead" style="border: 1px solid #afafaf;text-align:center;font-weight: bold;background-color:#ececff;font-size:1.2em;margin-bottom:.1em;">{{{1}}}</div><div class="NavContent" style="text-align:left;display:{{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1}}/Table of Contents|{{PAGENAME}}|block|{{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1}}/Walkthrough|{{PAGENAME}}|block|none}}}}">|</div></div>}}<noinclude>
{{#if:{{{1|}}}|<div class="mw-collapsible {{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1}}/Table of Contents|{{PAGENAME}}||{{#ifeq:{{#titleparts:{{FULLPAGENAME}}|1}}/Walkthrough|{{PAGENAME}}||mw-collapsed}}}}"><div class="mw-collapsible-header" style="border:1px solid #afafaf;text-align:center;font-weight:bold;background-color:#ececff;font-size:1.2em">{{{1}}}</div><div class="mw-collapsible-content">|</div></div>}}<noinclude>
 
{{Documentation}}
{{Documentation}}


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

Revision as of 05:49, 7 August 2021

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


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

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

Contents