Difference between revisions of "Template:Infobox template"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(standardized metatemplate for infoboxes)
 
(add collapsibility as an option)
 
Line 1: Line 1:
{| style="float:right; background-color:#eeeeee; border:2px #999999 solid; padding:4px; margin:4px; width:220px;"
+
{| style="float:right; background-color:#eeeeee; border:2px #999999 solid; padding:4px; margin:4px; width:220px;" {{#ifeq: {{{collapsed|}}} | yes | class="collapsible collapsed" | }} {{#ifeq: {{{collapsed|}}} | no | class="collapsible" | }}
 
|-
 
|-
 
! align="center" | {{{title}}}
 
! align="center" | {{{title}}}
Line 6: Line 6:
 
{{{contents}}}
 
{{{contents}}}
 
|}<noinclude>
 
|}<noinclude>
 +
 +
Format:
 +
<pre>
 +
{{infobox template
 +
|title=
 +
|contents=
 +
|collapsed=
 +
}}
 +
</pre>
 +
 +
If you put the string "yes" in the collapsed= parameter, the table will be collapsible and will default to hidden.
 +
 +
If you put the string "no" in the collapsed= parameter, the table will be collapsible and will default to shown.
 +
 +
Any other value in the collapsed= parameter, or no value at all, will make the table non-collapsible.
 +
 
[[Category:Navigational templates]]
 
[[Category:Navigational templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 22:19, 2 February 2010

{{{title}}}

{{{contents}}}

Format:

 {{infobox template
 |title=
 |contents=
 |collapsed=
 }}

If you put the string "yes" in the collapsed= parameter, the table will be collapsible and will default to hidden.

If you put the string "no" in the collapsed= parameter, the table will be collapsible and will default to shown.

Any other value in the collapsed= parameter, or no value at all, will make the table non-collapsible.