Template:Hide: Difference between revisions

Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
m
Text replacement - "<br>" to "<br/>"
mNo edit summary
m (Text replacement - "<br>" to "<br/>")
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{#switch:{{{1|}}}
{{#switch:{{{1|}}}
|#default=<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>
| ~button = <span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="{{{style|{{{showstyle|}}}}}}">{{{show|[show]}}}</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none; {{{style|{{{hidestyle|}}}}}}">{{{hide|[hide]}}}</span>
|~button=<span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="display:none; {{{style|{{{showstyle|}}}}}}">{{{show|[show]}}}</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none; {{{style|{{{hidestyle|}}}}}}">{{{hide|[hide]}}}</span>
| ~content = <div class="_toggle_inithide _toggle toggle-hidden" style="{{{style|{{{3|}}}}}}">{{{content|{{{2|}}}}}}</div>
|~content=<div class="_toggle_inithide _toggle toggle-hidden" style="{{{style|{{{3|}}}}}}">{{{content|{{{2|}}}}}}</div>
| ~all = <span class="_toggler_show-toggle-hidden _toggler_hide-toggle-visible _toggler-hideall _toggler-showall showall" style="{{{showstyle|}}}">{{{showtext|[show all]}}}</span><span class="_toggler_hide-toggle-hidden _toggler_show-toggle-visible _toggler-showall _toggler-hideall hideall" style="display:none; {{{hidestyle|}}}">{{{hidetext|[hide all]}}}</span>
|~all=<span class="_toggler_show-toggle-hidden _toggler_hide-toggle-visible _toggler-hideall _toggler-showall showall" style="{{{showstyle|}}}">{{{showtext|[show all]}}}</span><span class="_toggler_hide-toggle-hidden _toggler_show-toggle-visible _toggler-showall _toggler-hideall hideall" style="display:none; {{{hidestyle|}}}">{{{hidetext|[hide all]}}}</span>
| #default = <span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible">{{{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>
}}<noinclude>
==Purpose==
==Purpose==
This template allows easy hiding of text and other content.
This template allows easy hiding of text and other content.
Line 24: Line 25:
{{clear}}
{{clear}}
===Advanced Usage===
===Advanced Usage===
If this isn't enough, the template can be used in parts instead, for more flexible use within tables and div boxes. Advanced wiki-coding knowledge is suggested for using the hide template in this way.<br>
If this isn't enough, the template can be used in parts instead, for more flexible use within tables and div boxes. Advanced wiki-coding knowledge is suggested for using the hide template in this way.<br/>
For advanced usage, use this code:
For advanced usage, use this code:
<div style="float:left; margin-right:20px"><pre>
<div style="float:left; margin-right:20px"><pre>
Line 30: Line 31:
{{hide|~content|content=|style=}}
{{hide|~content|content=|style=}}
</pre></div>
</pre></div>
The button can be placed anywhere before <nowiki>{{hide|~content}}</nowiki>. It will only affect the next instance of <nowiki>{{hide|~content}}</nowiki>. Future instances require another button. The ''style'' parameter for the button is to add styling for the button's span tags. This parameter styles both the show and hide version of the button. To style each version of the button seperately, omit the ''style'' parameter and instead use the ''showstyle'' and ''hidestyle'' parameters to style the show and hide version of the button, respectively.<br>The ''style'' parameter on the content is to enter any styling directly in to the div for the content, in addition to any other styling you use outside of it. You can delete the ''show'' and ''hide'' parameters if you do not wish to change them from their defaults.
The button can be placed anywhere before <nowiki>{{hide|~content}}</nowiki>. It will only affect the next instance of <nowiki>{{hide|~content}}</nowiki>. Future instances require another button. The ''style'' parameter for the button is to add styling for the button's span tags. This parameter styles both the show and hide version of the button. To style each version of the button seperately, omit the ''style'' parameter and instead use the ''showstyle'' and ''hidestyle'' parameters to style the show and hide version of the button, respectively.<br/>The ''style'' parameter on the content is to enter any styling directly in to the div for the content, in addition to any other styling you use outside of it. You can delete the ''show'' and ''hide'' parameters if you do not wish to change them from their defaults.


Note that you can also use images in place of text for the buttons. However, in order for them to function properly, the images must be set to link to nothing, instead of some other page or its own page.
Note that you can also use images in place of text for the buttons. However, in order for them to function properly, the images must be set to link to nothing, instead of some other page or its own page.

Navigation menu