Difference between revisions of "Template:TOC hidden"

From RealCTY
Jump to navigation Jump to search
(Created page with "{{Documentation subpage}} <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> This template is for page <nowiki>__TOC__</nowiki> (Table Of Contents) code to go into a collapsib...")
 
 
(52 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
+
{{main other||{{#if:{{{float|}}}|<div style="margin-bottom: 0.1em; margin-{{#ifeq:{{{float|}}}|right|left|right}}: 0.5em; padding: 0.5em 1.4em 0.8em 0; float: {{{float|}}}">}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
+
{{{!}} cellspacing=0 cellpadding=2 class="collapsible collapsed" style="{{#if:{{{width|}}}|width: {{{width}}};}} margin-top: 0.2em; margin-bottom: 0.2em; margin-left: 0.2em; margin-right: 0.2em; border: none"
 +
|-
 +
! style="text-align: center; font-size: 95%; width: 250px; border: 1px solid #aaa; background-color: transparent; padding-right: 0.5em" {{!}} '''{{MediaWiki:Toc}}'''
 +
{{!}}-
 +
{{!}} align="center" style="{{#if:{{{font|}}}|font-size: {{{font|}}}|}}; background-color: transparent; border: none; padding: 0; margin: 0" {{!}} <div id="toctitle" style= "display:none; border: none; background-color: transparent; padding: 0; margin: 0"></div><div id="toc" style="display:block; height: 1px; border: none; background-color: transparent; padding: 0; margin: 0"></div>__TOC__
 +
{{!}}} {{#if:{{{float|}}}|</div>}}}}
  
This template is for page <nowiki>__TOC__</nowiki> (Table Of Contents) code to go into a collapsible box that has [show]/[hide] functionality with the default being that the box is collapsed (and the TOC hidden) thereby allowing for a single click on the [show] area for display. This provides editors an option to better pages with long TOCs so that the lead isn't by default occupied with a large amount of dead blank space. Place the template in the location where the TOC is to be displayed. Note that Show Preview will show the TOC; the page must first be saved before the TOC will be hidden.
+
<noinclude>
 
+
=1=
 
+
==1.1==
== Usage ==
+
==1.2==
 
+
=2=
Place the following on the page: <code>{{tl|TOC hidden}}</code>
+
==2.1==
 
+
==2.2==
== Alternatives ==
+
</noinclude>
 
 
The necessity of this template is often disputed, so apply it with consideration. A suggested alternative is: <code>{{tl|TOC limit}}</code>. Another alternative, for no table of contents at all, is the [[WP:MAGIC|magic word template]] <nowiki>__NOTOC__</nowiki>.
 
 
 
<includeonly>
 
<!-- ADD CATEGORIES BELOW THIS LINE -->
 
[[Category:Wikipedia table of contents templates|Hidden]]
 
 
 
<!-- ADD INTERWIKIS BELOW THIS LINE -->
 
[[ro:Template:TOC hidden]]
 
</includeonly>
 

Latest revision as of 10:15, 23 August 2014


1

1.1

1.2

2

2.1

2.2