Template:Hidden
{{{2}}}
This template has been protected from editing to prevent vandalism. Please discuss changes on the talk page or request unprotection. |
This template uses TemplateStyles: |
This template displays the first parameter (the header) with a ▼ (show) link on the right. If ▼ is clicked by the user, the second parameter (the content) is also displayed.
Usage
{{Hidden |1= |2= }}
Do not prefix the template with colon ":", otherwise the second parameter will not be hidden.
Example with ":"
:{{Hidden|1=prefixed with colon parameter one|2=prefixed with colon parameter two}}
prefixing the template with a colon ":" forces the parameter to be always unhidden:
prefixed with colon parameter two
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 header | header | The header of the hidden content, or ‘end’ to produce a box closing. The header is always visible; this is the text that gets the arrow next to it. | empty | required |
2 content | content | The hidden content. If not specified, you should use another {{Hidden|end}} to close the hidden box, and put content between the two. | empty | optional |
style css | additional CSS | Add CSS to the main div | empty | optional |
headerstyle headercss | additional header CSS | Add CSS to the header | empty | optional |
contentstyle contentcss | additional content CSS | Add CSS to the content. Works with both content passed as parameter and with content put between the two templates. | empty | optional |
toggle | toggle position | Set to ‘left’ to align the text in the header to the left | center | optional |
status | status | Whether to collapse the box initially | collapsed | optional |
hlist | hlist | Specify any value to format the content horizontally when the content is a list. Works only with content passed as a parameter. | empty | optional |
fw1 | heading font weight | The CSS font weight for the heading. Use ‘headerstyle’ parameter instead. | bold | deprecated |
fw2 | body font weight | The CSS font weight for the body. Use the ‘bodystyle’ parameter instead. | normal | deprecated |
bg1 | heading background color | The CSS background color for the heading. Use ‘headerstyle’ parameter instead. | transparent | deprecated |
bg2 | body background color | The CSS background color for the body. Use the ‘bodystyle’ parameter instead. | transparent | deprecated |
ta2 | body text align | The CSS text align for the body. Use the ‘bodystyle’ parameter instead. | start | deprecated |
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information This template displays the first parameter (the header) with a ▼ (show) link on the right. If ▼ is clicked by the user, the second parameter (the content) is also displayed.
|
Additional information
The template is intended to be used in the following namespaces: no namespace specified
The template is intended to be used by the following user groups: no user group specified
Relies on:
The functionality is depending on MediaWiki:Gadget-CollapsibleTemplates.
See also
Localization
This template is not intended to be localized.
Examples
Using one 'Template:Hidden'
- Example 1 :
{{Hidden|1=parameter one|2=parameter two}}
produces
parameter two
- Example 2 :
{{Hidden|toggle=left|1=toggle=left, parameter one|2=parameter two}}
produces
parameter two
- Example 3 :
{{Hidden|toggle=left|1=toggle=left, parameter one, newline in parameter two|2=
parameter two}}
produces
parameter two
- Example 4 :
{{Hidden|toggle=left|1=toggle=left, parameter one, break in parameter two|2=<br />
parameter two}}
produces
break in parameter two
- Example 5 :
{{Hidden|style=background:yellow|1=parameter one|2=parameter two}}
produces
parameter two
- Example 6 :
{{Hidden|style=width: 50%;|headerstyle=background:#CFC;|contentstyle=background:#FDD;color:blue;|1=parameter one|2=parameter two}}
produces
parameter two
Using two 'Template:Hidden'
- Example 1 : (with frame)
{{Hidden|headerstyle=background:#EEE;|contentstyle=white;color:black|style=border:1px grey solid; padding:2px |1=title}} Any content {{Hidden|end}}
produces
Any content
- Example 2 :
{{Hidden|style= width: 50%; |headerstyle= background:#CFC; |contentstyle= background:#FDD;color:blue; |1=parameter one}} {| class="wikitable" |Any |content |} {{Hidden|end}}
produces
Any | content |
- Example 3 :
{{Hidden|title|style=background:#EEE}} content {{Hidden end}}
produces
content
- Example 4 :(without frame)
{{Hidden|headerstyle= background:#EEE; |contentstyle =white;color:black |1=title}} Any content {{Hidden|end}}
produces
Any content