Psuvillager (talk | contribs) (Moved the code to this properly named `Template:` page.) |
Psuvillager (talk | contribs) (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=" |
<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 |
"description": "This template adds a collapsible div tall enough for its toggle button. Title is optional; content is required.", |
||
"params": { |
"params": { |
||
" |
"content": { |
||
"label": " |
"label": "content", |
||
"description": " |
"description": "Part that actually collapses", |
||
"required": |
"required": 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.", |
||
⚫ | |||
" |
"type": "string" |
||
}, |
|||
" |
"title": { |
||
" |
"label": "title", |
||
⚫ | |||
}, |
|||
" |
"required": false, |
||
" |
"suggested": false, |
||
⚫ | |||
⚫ | |||
" |
"aliases": ["2"], |
||
" |
"default": null, |
||
" |
"example": "My Section", |
||
"type": "string" |
|||
} |
|||
}, |
}, |
||
" |
"paramOrder": ["content","title"], |
||
"sets": [{ |
|||
" |
"label": "group of related parameters", |
||
" |
"params": ["content","title"] |
||
}], |
|||
"format": "inline", |
|||
⚫ | |||
⚫ | "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 |
||
"type": "string" |
|||
} |
|||
}, |
|||
"paramOrder": [ |
|||
"title", "summary", "details" |
|||
], |
|||
"sets": [ |
|||
{ |
|||
"label": "group of related parameters", |
|||
"params": ["title", "summary", "details"] |
|||
} |
|||
], |
|||
"format": "inline", |
|||
⚫ | |||
} |
} |
||
</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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
content | content 1 | Part that actually collapses
| String | required |
title | title 2 | Always visible at top (if included)
| String | optional |