Template
Collapsed text
From Dogcraft Wiki
Template documentation
This template can wrap a paragraph or multiple paragraphs of text in a custom collapsible box, using mediawiki's built-in collapsible tools. This collapsible box is open by default. This custom box will have an iconed close button in the top right corner while open, and will have a centered iconed open button replace the entire content when closed.
Syntax
Example
{{Collapsed text
|name=example
|content=Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}}
generates:
With custom hide/show buttons:
{{Collapsed text
|name=example2
|hide=Vanish
|show=Appear text
|content=Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}}
generates:
TemplateData
This template can wrap a paragraph or multiple paragraphs of text in a custom collapsible box, using mediawiki's built-in collapsible tools. This collapsible box is open by default. This custom box will have an iconed close button in the top right corner while open, and will have a centered iconed open button replace the entire content when closed.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Name | name 1 | This is as the collapsible section's name. Its not visible, but it should be unique per page. This '''must''' be a single word, use camelCase, '_' or '-' instead of spaces if necessary. If there are two collapsible sections with the same name on the same page, the buttons will toggle both of them. (Because the name is how they tell the difference)
| String | required |
Content | content 2 | This parameter contains whatever should be collapsed. It can be multiple paragraphs, divs, etc.
| String | required |
Hide | hide | This parameter sets the text for the button which hides the content, defaults to 'Hide'
| String | suggested |
Show | show | This parameter sets the text for the button which shows the content again after it has been hidden, defaults to 'Show' and is initially hidden (until the content gets hidden)
| String | suggested |