Difference between revisions of "Template:Showhide/List"
From SpiralKnights
m (added control) |
m (doc prep) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <div style= | + | <includeonly><div style= |
" | " | ||
width: 100%; | width: 100%; | ||
Line 6: | Line 6: | ||
border-radius: 10px; | border-radius: 10px; | ||
border-width: 2px; | border-width: 2px; | ||
− | padding: 0px 0px 0px 0px; | + | padding: {{#switch:{{{icon|}}} |
+ | |#default = 0px 0px 0px 0px; | ||
+ | |no icon = 8px 0px 0px 0px | ||
+ | }} | ||
" | " | ||
class="NavFrame {{{state|uncollapsed}}}" | class="NavFrame {{{state|uncollapsed}}}" | ||
Line 21: | Line 24: | ||
" | " | ||
class="NavHead" | class="NavHead" | ||
− | >[[File:Icon-{{{icon|accessory}}}.png|28px]] {{{title}}} | + | >{{#switch:{{{icon|no icon}}}|#default=[[File:Icon-{{{icon|accessory}}}.png|28px]] {{{title}}} |
+ | |no icon={{{title}}} | ||
+ | }} | ||
</div> | </div> | ||
Line 33: | Line 38: | ||
font-size: 120%;" class="NavContent"> | font-size: 120%;" class="NavContent"> | ||
{{{content}}} | {{{content}}} | ||
− | </div></div><noinclude>{{documentation}} [[Category:Showhide Templates]]</noinclude> | + | </div></div></includeonly><noinclude> |
+ | {{documentation}} | ||
+ | |||
+ | [[Category:Showhide Templates]] | ||
+ | </noinclude> |
Latest revision as of 20:57, 19 November 2015
Usage
This template should be used sparingly. It was originally meant to provide a navigational aid for large pages, but we have established that potentially forever-expanding lists should simply always be at the bottom of the published page, followed only by a "See Also" section.
If a page has more than one very large list, this template may be used to aid a certain kind of navigation within the page, when the ToC is out of sight and the user does not wish to break certain scrolling/browsing patterns.
See what links here for examples of this template in action.
See node 107625 for a detailed discussion about lists on pages.
The function of this template should be replaced by an AJAX extension or an equivalent if our wiki ever gets them. This page on the Terraria wiki has a nice example: individually loading sections, via the "Click here to reveal this content. (there may be a slight delay)" is preferable to this show/hide method, and more convenient than splitting a page into subpages and/or {{main|}} links.
The above documentation is transcluded from Template:Showhide/List/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |