Template:Databox: Difference between revisions

Inthar (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="toccolours mw-collapsible {{#ifeq:{{{defaultstate|}}}|expanded||mw-collapsed}}" style="overflow:auto;">'''{{{1|{{{title}}} }}}'''<div class="mw-collapsible-content">{{{2|{{{text}}} }}}</div></div></includeonly><noinclude>
<includeonly><div class="toccolours {{#ifeq: {{{collapse|}}}|false||mw-collapsible {{#ifeq: {{{defaultstate|}}}|expanded||mw-collapsed}}}}" style="overflow: auto;">'''{{{1|{{{title|}}}}}}'''{{#if: {{{2|{{{text|}}}}}}|<div class="mw-collapsible-content">{{{2|{{{text}}}}}}</div>|}}</div></includeonly><noinclude>
This template creates a collapsible text box. If you want the box to be expanded by default, set the parameter <code>defaultstate=expanded</code>.
{{documentation}}
 
You type:
 
<pre>
{{Databox|Title|
Contents
}}
</pre>
 
You get:
 
{{{{PAGENAME}}|Title|
Contents
}}
 
Note: To include the character <code>|</code>, it must be escaped as <code><nowiki>{{!}}</nowiki></code>, unless it appears inside preformatted text (such as a <nowiki><syntaxhighlight></nowiki> tag).


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>