Template:Databox: Difference between revisions
From Xenharmonic Reference
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><div class="{{#ifeq: {{{collapse|}}}|false||mw-collapsible {{#ifeq: {{{defaultstate|}}}|expanded||mw-collapsed}}}}" style="overflow: auto; background-color: #066;">'''{{{1|{{{title|}}}}}}'''{{#if: {{{2|{{{text|}}}}}}|<div class="mw-collapsible-content">{{{2|{{{text}}}}}}</div>|}}</div></includeonly><noinclude> | <includeonly><div class="{{#ifeq: {{{collapse|}}}|false||mw-collapsible {{#ifeq: {{{defaultstate|}}}|expanded||mw-collapsed}}}}" style="overflow: auto; background-color: #066; border: 1px solid #c8ccd1;">'''{{{1|{{{title|}}}}}}'''{{#if: {{{2|{{{text|}}}}}}|<div class="mw-collapsible-content">{{{2|{{{text}}}}}}</div>|}}</div></includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 21:51, 8 April 2026
<templatestyles src="documentation/styles.css" />
Template:Dochead
This template creates a collapsible text box. If you want the box to be expanded by default, set the parameter defaultstate=expanded.
Usage
You type:
{{Databox
| Title
| Contents
}}
You get:
Title
Contents
To make a databox permanently expanded, pass collapse=false as follows:
{{Databox|collapse=false
| Title
| Contents
}}
Title
Contents
