Template:Databox/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{dochead}}
{{dochead}}
This template creates a collapsible text box. If you want the box to be expanded by default, set the parameter <code>defaultstate=expanded</code>.
=== Usage ===
You type:  
You type:  


Line 11: Line 14:
You get:  
You get:  


{{{{ROOTPAGENAMEE}}
{{{{ROOTPAGENAME}}
| Title
| Contents
}}
 
To make a databox permanently expanded, pass <code>collapse=false</code> as follows:
 
<pre>
{{Databox|collapse=false
| Title
| Contents
}}
</pre>
 
{{{{ROOTPAGENAME}}|collapse=false
| Title
| Title
| Contents
| Contents
}}
}}


Note: To include the pipe (<code>{{!}}</code>) character, it must be escaped as <code>{{((}}!{{))}}</code>, unless it appears inside preformatted text (such as a <code>{{^(}}syntaxhighlight{{)^}}</code> tag).
{{Escape notice}}

Latest revision as of 18:17, 30 January 2025

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

Note: Pipe characters (|) must be escaped as {{!}} or {{pipe}}, equals signs must be escaped as {{=}} (this may apply to tags as well, e.g. <div style{{=}}"…">), and other special characters and character sequences may need to be escaped accordingly, except for ones inside <nowiki>, <pre>, <math>, and <syntaxhighlight> tags.