Template:Collapsible
Purpose
Makes content collapsible. Used for large lists and tables as well as other supplementary content such as companion comments. It has also been used to describe plots with forking paths (see The Crystal Trap and The Subspace Emissary).
Usage
{{Collapsible |content= }}
{{Collapsible |id= |header= |frame= |collapse= |stretch= |buttonHide= |buttonShow= |content= }}
Parameter | Status | Description | Default value |
---|---|---|---|
id | optional | Sets the ID attribute of the collapsible content so that it can be linked as a section. Defaults to header . | |
header | suggested | The title of the collapsible content. | |
frame | optional | If present, a border is added around the collapsible content and header. | |
collapse | optional | If present, the content starts off in the collapsed state on page load. Content is collapsed by default when | |
stretch | optional | If present, the header stretches to fill the screen rather than fitting itself to its content. Works only when frame is enabled. | |
buttonHide | optional | Text to use for the "hide" button label | hide |
buttonShow | optional | Text to use for the "show" button label | show |
content | required | The content to be made collapsible. |
Makes content collapsible.
Parameter | Description | Type | Status | |
---|---|---|---|---|
id | id | Sets the [https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id ID attribute] of the collapsible content so that it can be linked as a [[Template:Section|section]]. Defaults to <code>header</code>. | String | optional |
header | header | The title of the collapsible content. | Content | suggested |
frame | frame | If present, a border is added around the collapsible content and header. | Boolean | optional |
collapse | collapse | <p>If present, the content starts off in the collapsed state on page load.</p><p>Content is collapsed by default when <code>frame</code> is set. To override this, set <code>collapse</code> to <code>false</code>.</p> | Boolean | optional |
stretch | stretch | If present, the header stretches to fill the screen rather than fitting itself to its content. Works only when <code>frame</code> is enabled. | Boolean | optional |
buttonHide | buttonHide | Text to use for the "hide" button label | String | optional |
buttonShow | buttonShow | Text to use for the "show" button label | String | optional |
content | content | The content to be made collapsible. | Content | required |
Examples
{{Collapsible |header= List of Challenges |content= #Win your first battle! #Win 5 times! #Win 10 times! #Win 20 times! }}
- Win your first battle!
- Win 5 times!
- Win 10 times!
- Win 20 times!
{{Collapsible |header= List of Challenges |collapse= true |content= #Win your first battle! #Win 5 times! #Win 10 times! #Win 20 times! }}
- Win your first battle!
- Win 5 times!
- Win 10 times!
- Win 20 times!
{{Collapsible |header= List of Challenges |frame= true |content= #Win your first battle! #Win 5 times! #Win 10 times! #Win 20 times! }}
- Win your first battle!
- Win 5 times!
- Win 10 times!
- Win 20 times!
{{Collapsible |header= List of Challenges |frame= true |collapse= false |stretch= true |content= #Win your first battle! #Win 5 times! #Win 10 times! #Win 20 times! }}
- Win your first battle!
- Win 5 times!
- Win 10 times!
- Win 20 times!
{{Collapsible |collapse= true |buttonHide= hide transcript |buttonShow= show transcript |content= {{Transcript Copy|fromPage= Aryll|storedAs= Letter}} }}
How have you been, Big Brother?
I'm here on the pirate ship writing you
this letter. Isn't that neat?
At first, I was really scared, but they're
all actually nice...for pirates, I mean.
Mr. Gonzo is a really big guy, but ever
since Miss Tetra left, he's been crying
like a baby. It's kinda funny...but sort
of sad, too.
Nudge is a little strange, but nice, too,
and as for Senza...his beard makes him
look pretty mean, but he tells really cool
stories when he gets in the right mood.
Zuko's kind of weird, and Mako is pretty
quiet... Mako immediately gets mad
whenever I try to take his glasses...so I
do that a lot. Hee hee!
As usual, Niko is always fooling around.
He won't take anything serious. Actually,
he seems sad not to have you around
anymore. Were you guys good friends?
I helped them all out with their chores,
and they actually paid me a little for it,
so I'm sending the money to you. Please
use it, Big Brother!
I'll loan you my telescope for a little
longer...but you have to return it to me
eventually, OK?
I'm doing fine here, so don't you worry.
I'll take care of myself, so you be sure to
take good care of yourself. Good luck!
Aryll
content
cannot be blank
{{Collapsible |header= foo |content= }}
{{!}}
, {{(!}}
, and {{!)}}
{{Collapsible |header= Table |frame= true |collapse= false |content= {{(!}} class="wikitable" ! Table Header {{!}} Table Content {{!)}} }}
Table Header | Table Content |
---|
Guidelines
- All collapsibles should have headers, with the exception of collapsibles used in table cells (e.g. Letter#The Wind Waker).