Template:Hidden

From Darkan
Jump to navigation Jump to search

[view] [edit] [purge] Template documentation

This documentation is transcluded from Template:Hidden/doc.

It displays the first parameter (the heading) with a [show] link on the right. If [show] is clicked by the user, the second parameter (the body) is displayed below the heading and the [show] link becomes [hide]. Clicking on [hide] then hides the body again and the [hide] link becomes [show] again.

Usage

Basic usage example
{{Hidden|header|content}}

Only two parameters are required for this template:

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

Note: if not defined, it will be blank with a show or hide.

Optional parameters

Header

bg1
Add background color to the header.
tc1
Add color to the text of the the header.
fw1
Add font weight of the header.
ta1
Add text alignment to the header.

Content

bg2
Add background color to the content.
tc2
Add color to the text of the content.
fw2
Add font weight of the the content.
ta2
Add text alignment to the content.

Collapsibility

show
Change the collapsibility of the template ("autocollapse" or "collapsed" only)

Examples

Simple

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

Advanced

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

Expert

Code
{{hidden|Title text here|Body text line 1<br/>Body text line 2|bg1=#ccccff|bg2=#454545|ta1=center|tc1=white|tc2=gray|show=collapsed}}
Result

Issues

There is a current issue where if the template is in a table that has "wikitable" as a class, it will give it a border, a default background color, and change the text alignment.