Difference between revisions of "Template:TOC hidden"

From RealCTY
Jump to navigation Jump to search
Line 1: Line 1:
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
+
{{ {{{|safesubst:}}}main other||{{ {{{|safesubst:}}}#invoke:Unsubst||$N=TOC_hidden |$B={{#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|}}}">}}
 
+
{{(!}} 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"
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.
+
{{!}}-
 
+
! style="text-align: center; font-size: 95%; width: 250px; border: 1px solid #aaa; background-color: transparent; padding-right: 0.5em" {{!}} '''{{MediaWiki:Toc}}'''
 
+
{{!}}- 
== Usage ==
+
{{!}} align="center" style="{{#if:{{{font|}}}|font-size: {{{font|}}}|}}; background-color: transparent; border: none; padding: 0; margin: 0" {{!}} <span id="togglelink"></span>__TOC__
 
+
{{!)}} {{#if:{{{float|}}}|</div>}}}}}}<noinclude>{{template doc}}<!-- Add cats and interwikis to the /doc subpage, not here! --></noinclude>
Place the following on the page: <code>{{TOC hidden}}</code>
 
 
 
== Alternatives ==
 
 
 
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>
 

Revision as of 19:29, 22 August 2014

{{ safesubst:#invoke:Unsubst||$N=TOC_hidden |$B=

}}Template:Template doc