Jump to content

Template:Hidden

From pool
Revision as of 14:40, 2 July 2020 by Caleb Cooper (talk | contribs)
This content is in the Template Namespace. Used for page-templates that can be re-used across the wiki.
{{{1}}}
{{{2}}}


Usage

Full syntax

{{Hidden
| expanded=true  <!--(omit for initial hidden state)-->
| style = 
| headerstyle = 
| header = 
| contentstyle = 
| content =

|fw1= |fw2= |bg1= |bg2= |ta1= |ta2=
}}

Parameters

Only two parameters are required for this template:

header
text for header (title); alternative to using unnamed parameter {{{1}}}
content
text for body (content); alternative to using unnamed parameter {{{2}}}

Optional

style
CSS styling for template overall.
headerstyle
CSS styling for title (header).
contentstyle
CSS styling for the hidden content.
expanded
any nonblank value (e.g. |expanded=on) will cause the template to be initially expanded by default.
multiline
any nonblank value (e.g. |multline=y) will reduce the line-height of the title and add some padding to avoid overlap with the show/hide button.

Note: This template will not respect the user preference "justify paragraphs".

Examples

Basic

In this example only the two required parameters are specified.

Code
{{hidden|Title text here|Body text line 1<br/>Body text line 2}}
Result
Title text here
Body text line 1
Body text line 2

Header background

Code
{{hidden
|Title text here
|Body text line 1<br/>Body text line 2
|headerstyle=background:#ccccff
|style=text-align:center;
}}
Result
Title text here
Body text line 1
Body text line 2

CSS

Code
{{hidden
| style = border:1px dashed red; width: 50%;
| headerstyle = background: #ccccff; font-size: 110%;
| contentstyle = text-align: center; color:green;
| header = Title text here
| content = Body text line 1<br />Body text line 2<br />Body text line 3
}}
Result
Title text here
Body text line 1
Body text line 2
Body text line 3

This hides

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Title1 title header

text for header (title)

Stringrequired
Body2

text for body (content)

Stringrequired
fw1fw1

no description

Unknownoptional
bg1bg1

no description

Unknownoptional
ta1ta1

no description

Unknownoptional
stylestyle css

CSS styling for template overall.

Unknownoptional
Header CSSheaderstyle headercss titlestyle titlecss

CSS styling for title (header)

Unknownoptional
Headerheader

text for header (title); alternative to using unnamed parameter {{{1}}}

Unknownoptional
Content CSScontentstyle contentcss

CSS styling for the hidden content

Stringoptional
Contentcontent contents text

text for body (content); alternative to using unnamed parameter {{{2}}}

Unknownoptional
fw2fw2

no description

Unknownoptional
bg2bg2

no description

Unknownoptional
ta2ta2

no description

Unknownoptional
toggletoggle showhide

Set toggle to left to show "Expand" on left side of page

Example
toggle=left
Stringoptional
expandedexpanded expand

any nonblank value will cause the template to be initially expanded by default.

Example
expanded=on
Unknownoptional
classclass

no description

Unknownoptional
borderborder

no description

Unknownoptional
multilinemultiline multi-line

any nonblank value will reduce the line-height of the title and add some padding to avoid overlap with the show/hide button.

Example
multline=y
Unknownoptional
collapsetextcollapsetext

Text to replace "Collapse" toggle

Example
collapsetext="Hide"
Unknownoptional
expandtextexpandtext

Text to replace "Expand" toggle

Example
expandtext="+"
Stringoptional