×
Create a new article
Write your page title here:
We currently have 1,779 articles on The Quelmar Wiki. Type your article name above or click on one of the titles below and start writing!



The Quelmar Wiki

Template:Collapsible Section: Difference between revisions

(Moved the code to this properly named `Template:` page.)
 
(Simplified, fixed syntax, explicitly included collapsible classes)
Line 1: Line 1:
<div class="mw-collapsible" style="min-height:1.5em">
<span><h2 style="display: inline; margin: none; border: none;">{{title}}{</h2><span>{{summary}}</span></span>
<div class="mw-collapsible mw-collapsed">{{details}}</div>
<div class="collapsible-title">{{{title}}}</div>
<span mw-collapsible-toggle-placeholder></span>

<div class="mw-collapsible-content">
{{{content}}}
</div>
</div>


<noinclude>
<!-- Docs: www.mediawiki.org/wiki/Extension:TemplateData -->
<!-- Docs: www.mediawiki.org/wiki/Extension:TemplateData -->
<templatedata>
<templatedata>
{
{
"description": "This template adds a collapsible text block, under a level-2 header with optional summary text.",
"description": "This template adds a collapsible div tall enough for its toggle button. Title is optional; content is required.",
"params": {
"params": {
"title": {
"content": {
"label": "Header",
"label": "content",
"description": "Section name",
"description": "Part that actually collapses",
"required": false,
"required": true,
"suggested": true,
"aliases": ["1"],
"example": "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.",
"deprecated": false,
"aliases": ["1"],
"type": "string"
"default": null,
},
"example": "My Section",
"title": {
"type": "string"
"label": "title",
"description": "Always visible at top (if included)",
},
"summary": {
"required": false,
"label": "Summary",
"suggested": false,
"deprecated": false,
"description": "Optional summary text (always visible)",
"required": false,
"aliases": ["2"],
"suggested": false,
"default": null,
"aliases": ["2"],
"example": "My Section",
"example": ", which has this great summary",
"type": "string"
"type": "string"
}
},
},
"details": {
"paramOrder": ["content","title"],
"label": "Details",
"sets": [{
"description": "Collapsed text",
"label": "group of related parameters",
"required": false,
"params": ["content","title"]
"suggested": true,
}],
"aliases": ["3"],
"format": "inline",
"maps": {}
"example": "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.",
"type": "string"
}
},
"paramOrder": [
"title", "summary", "details"
],
"sets": [
{
"label": "group of related parameters",
"params": ["title", "summary", "details"]
}
],
"format": "inline",
"maps": {}
}
}
</templatedata>
</templatedata>
</noinclude>

Revision as of 23:52, 17 January 2025

{{{title}}}

{{{content}}}


This template adds a collapsible div tall enough for its toggle button. Title is optional; content is required.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
contentcontent 1

Part that actually collapses

Example
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.
Stringrequired
titletitle 2

Always visible at top (if included)

Example
My Section
Stringoptional
Cookies help us deliver our services. By using our services, you agree to our use of cookies. (Hi Margarita's Table. 🇩🇪)
Cookies help us deliver our services. By using our services, you agree to our use of cookies. (Hi Margarita's Table. 🇩🇪)