Template:Show: Difference between revisions

No edit summary
m simplify parameter name
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="NavFrame {{{collapsed|collapsed}}}"><div class="NavHead">{{{1}}} </div><div class="NavContent">{{{2}}}</div></div></includeonly><noinclude>{{TOCright}}
<includeonly><div class="mw-collapsible {{{collapsed|mw-collapsed}}}" data-collapsetext="hide&nbsp;▲" data-expandtext="show&nbsp;▼">{{{1}}} <div class="mw-collapsible-content">{{{2}}}</div></div></includeonly><noinclude>


This template produces a [show]/[hide] frame that can be hidden or shown on initial display of a wiki page.
This template produces a [show ]/[hide ] frame that can be hidden or shown on initial display of a wiki page.


==Usage==
==Usage==
<code><nowiki>{{Show|collapsed=collapsed|headline|content}}</nowiki></code>
<code><nowiki>{{Show|collapsed=mw-collapsed|headline|content}}</nowiki></code>


Required parameters:
Required parameters:
Line 12: Line 12:
Optional, named parameter:
Optional, named parameter:
# collapsed -- may have one of 2 possible values:
# collapsed -- may have one of 2 possible values:
#* collapsed -- (the default) -- hides the content and produces a [show] link after the headline
#* mw-collapsed -- (the default) -- hides the content and produces a [show ] link after the headline
#* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- (nothing) entered as <big><code>|collapsed=|</code></big> -- the content will show below the header, which will have a [hide] link next to it.
#* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- (nothing) entered as <big><code>|collapsed=|</code></big> -- the content will show below the header, which will have a [hide ] link next to it.


* See [[Template:Iframe]] for a way to show/hide full web pages.
* See [[Template:Iframe]] for a way to show/hide full web pages.
==Example==
==Example==


<nowiki>
<span style="white-space:pre-wrap"><nowiki>{{Show|collapsed=|Terminal output log: |<pre>[root@Dell-8400 ~]# df -Th
{{Show|collapsed=|Terminal output log: |<pre>[root@Dell-8400 ~]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1    ext4    18G  11G  6.8G  61% /
/dev/sda1    ext4    18G  11G  6.8G  61% /
Line 28: Line 27:
/dev/sdd1    vfat    15G  673M  15G  5% /media/SANDY
/dev/sdd1    vfat    15G  673M  15G  5% /media/SANDY
[root@Dell-8400 ~]#  
[root@Dell-8400 ~]#  
</pre>
</pre>}}</nowiki></span>
}}
</nowiki>


{{Show|collapsed=|Terminal output log: |<pre>[root@Dell-8400 ~]# df -Th
{{Show|mw-collapsed=|Terminal output log: |<pre>[root@Dell-8400 ~]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1    ext4    18G  11G  6.8G  61% /
/dev/sda1    ext4    18G  11G  6.8G  61% /