Template:Hide: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
No edit summary
Line 1: Line 1:
<span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="display:none;">{{{show|[show]}}}</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none;">{{{hide|[hide]}}}</span><div class="_toggle_inithide _toggle toggle-hidden">{{{content|{{{1}}}}}}</div><noinclude>
<span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="display:none;">{{{show|[show]}}}</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none;">{{{hide|[hide]}}}</span><div class="_toggle_inithide _toggle toggle-hidden">{{{content|{{{1}}}}}}</div><noinclude>
==Purpose==
==Purpose==
This template handles switching between two displayed items.
This template allows easy hiding of text and other content.


==Usage==
==Usage==
Line 8: Line 8:
or the named parameter format:
or the named parameter format:
<div style="float:left; margin-right:20px"><pre>
<div style="float:left; margin-right:20px"><pre>
{{Switch
{{Hide
|show=
|show=
|hide=
|hide=
Line 15: Line 15:
</pre></div>
</pre></div>
{{Parameter|show|This specifies the text of the link that shows the content that is initially hidden.|Optional|[show]}}
{{Parameter|show|This specifies the text of the link that shows the content that is initially hidden.|Optional|[show]}}
{{Parameter|hide|This specifies the text of the link that switches the content back to what was initially displayed.|Optional|[hide]}}
{{Parameter|hide|This specifies the text of the link that switches the content back to being hidden.|Optional|[hide]}}
{{Parameter|content|This specifies the content you want to be able to switch|Optional}}
{{Parameter|content|This specifies the content you want to be able to hide|Optional}}
{{clear}}
{{clear}}
==Example==
==Example==
To use this to set up a traditional show-type template that has nothing initially displayed, use something like the following:
To hide some text, use the following:
<pre>
<pre>
{{switch|content=This is hidden text.}}
{{Hide|content=This is hidden text.}}
</pre>
</pre>
This results in:
This results in:
{{switch|content=This is hidden text.}}
{{Hide|content=This is hidden text.}}


Alternatively:
Alternatively:
<pre>
<pre>
{{switch|This is hidden text.}}
{{Hide|This is hidden text.}}
</pre>
</pre>
This results in:
This results in:
{{switch|This is hidden text.}}
{{Hide|This is hidden text.}}
 
To make the opposite effect, use the following:
<pre>
{{switch|id=exampleB|show=[hide]|hide=[show]|content=This text can be hidden.}}
</pre>
This results in:
{{switch|id=exampleB|show=[hide]|hide=[show]|content=This text can be hidden.}}


{{Cat|Formatting Templates}}</noinclude>
{{Cat|Formatting Templates}}</noinclude>

Revision as of 09:02, January 16, 2012

{{{1}}}

Purpose

This template allows easy hiding of text and other content.

Usage

To use this template, use either the standard format     {{Hide| content }} or the named parameter format:

{{Hide
|show=
|hide=
|content=
}}
  • show — This specifies the text of the link that shows the content that is initially hidden. (Optional - [show])
  • hide — This specifies the text of the link that switches the content back to being hidden. (Optional - [hide])
  • content — This specifies the content you want to be able to hide (Optional )

Example

To hide some text, use the following:

{{Hide|content=This is hidden text.}}

This results in:

This is hidden text.

Alternatively:

{{Hide|This is hidden text.}}

This results in:

This is hidden text.