Template:Collapse top/doc: Difference between revisions
More actions
mNo edit summary |
fixing problematic template use with duplicate argument |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{TemplateBox | {{TemplateBox | ||
|1 = 1 | |1 = 1 | ||
|1d-en = These parameters give the main title of collapsed box, which | |1d-en = These parameters give the main title of collapsed box, which occurs on the same line as the ''show'' link and is always visible. | ||
occurs on the same line as the ''show'' link and is always visible. | |1d-de = Diese Parameter geben den Haupttitel der zusammengeklappten Box an, der in der gleichen Zeile wie der Link „zeigen“ steht und immer sichtbar ist. | ||
|1label = header | |1label = header | ||
|1label-de= Kopfzeile | |||
|1aliases = title / reason / header / heading | |1aliases = title / reason / header / heading | ||
|1type = string | |1type = string | ||
|1def = | |1def = | ||
|1stat = optional- | |1stat = optional- | ||
|2 = warning | |2 = warning | ||
|2d-en = If this parameter evaluates to true (i.e. is not 0, false, or empty) it will display a default warning line under the main title which reads | |2d-en = If this parameter evaluates to true (i.e. is not 0, false, or empty) it will display a default warning line under the main title which reads “The following is an archived debate. <span style="color:red;">'''Please do not modify it.'''</span>” (except if parameter #2 is given). | ||
|2d-td-en = If this parameter evaluates to true (i.e. is not 0, false, or empty) it will display a default warning line under the main title which reads | |2d-td-en = If this parameter evaluates to true (i.e. is not 0, false, or empty) it will display a default warning line under the main title which reads “The following is an archived debate. Please do not modify it.”, where the second sentence is in bold and red (except if parameter #2 is given). | ||
|2d-de = Wenn dieser Parameter den Wert true hat (d.h. nicht 0, false oder leer ist), wird unter dem Haupttitel eine Standard-Warnzeile angezeigt, die lautet: "Das Folgende ist eine archivierte Debatte. <span style="color:red;">'''Bitte nicht verändern.'''</span>" (außer wenn Parameter #2 angegeben wird). | |||
|2d-td-de = Wenn dieser Parameter den Wert true hat (d.h. nicht 0, false oder leer ist), wird unter dem Haupttitel eine Standard-Warnzeile angezeigt, die lautet: "Das Folgende ist eine archivierte Debatte. Bitte ändere sie nicht.", wobei der zweite Satz fett und rot ist (außer wenn der Parameter #2 angegeben wird). | |||
|2label = show warning text | |2label = show warning text | ||
|2type = | |2label-de= Warntext anzeigen | ||
|2type = line | |||
|2def = <!-- default value for the parameter --> | |2def = <!-- default value for the parameter --> | ||
|2stat = optional- | |2stat = optional- | ||
| Line 19: | Line 23: | ||
|3 = 2 | |3 = 2 | ||
|3d-en = This is optional warning-line text. It will override the standard warning line above, and obviate the need for setting the 'warning' parameter. | |3d-en = This is optional warning-line text. It will override the standard warning line above, and obviate the need for setting the 'warning' parameter. | ||
|3d-de = Dies ist ein optionaler Warnzeilentext. Er überschreibt die obige Standardwarnzeile und macht das Setzen des Parameters „warning“ überflüssig. | |||
|3label = custom warning text | |3label = custom warning text | ||
|3type = string | |3label-de= Benutzerdefinierter Warntext | ||
|3type = string | |||
|3def = <!-- default value for the parameter --> | |3def = <!-- default value for the parameter --> | ||
|3stat = optional- | |3stat = optional- | ||
| Line 26: | Line 32: | ||
|4 = expand | |4 = expand | ||
|4d-en = If this parameter evaluates to true (i.e. is not 0, false, or empty) it will leave the material uncollapsed with the border and coloring. Default is to collapse the material. However, when previewing edits, content will always display as uncollapsed; this is often helpful, but also often confusing! | |4d-en = If this parameter evaluates to true (i.e. is not 0, false, or empty) it will leave the material uncollapsed with the border and coloring. Default is to collapse the material. However, when previewing edits, content will always display as uncollapsed; this is often helpful, but also often confusing! | ||
|4d-de = Wenn dieser Parameter den Wert true hat (d.h. nicht 0, false oder leer ist), wird das Material mit dem Rand und der Färbung nicht eingeklappt. Standardmäßig wird das Material eingeklappt. In der Bearbeitungsvorschau wird der Inhalt jedoch immer als nicht eingeklappt angezeigt; das ist oft hilfreich, aber auch oft verwirrend! | |||
|4label = expand | |4label = expand | ||
|4type = | |4label-de= erweitern | ||
| | |4type = line | ||
|4sv = /true | |||
|4stat = optional- | |4stat = optional- | ||
|5 = bg | |5 = bg | ||
|5d-en = Sets the background color of the collapsed material | |5d-en = Sets the background color of the collapsed material | ||
|5label = background | |5d-de = Legt die Hintergrundfarbe des eingeklappten Materials fest | ||
|5label = background color | |||
|5label-de = Hintergrundfarbe | |||
|5type = string | |5type = string | ||
|5def = #CFC | |5def = #CFC | ||
|5stat = optional- | |5stat = optional- | ||
|6 = border | |6 = border | ||
|6d-en = Sets the width of the border line on the collapsed material. | |6d-en = Sets the width of the border line on the collapsed material. (in px) | ||
|6d-de = Legt die Breite der Umrandungslinie auf dem eingeklappten Material fest. (in px) | |||
|6label = border width | |6label = border width | ||
|6label-de = Rahmenbreite | |||
|6type = number | |6type = number | ||
|6def = | |6def = 1 | ||
|6stat = optional- | |6stat = optional- | ||
|7 = b-color | |7 = b-color | ||
|7d-en = Sets the border color. | |7d-en = Sets the border color. | ||
|7d-de = Legt die Farbe des Rahmens fest. | |||
|7label = border color | |7label = border color | ||
|7label-de= Rahmenfarbe | |||
|7type = string | |7type = string | ||
|7def = silver | |7def = silver | ||
| Line 53: | Line 67: | ||
|8 = padding | |8 = padding | ||
|8d-en = Sets the padding on the collapsed material in the colored area. | |8d-en = Sets the padding on the collapsed material in the colored area. (in px) | ||
|8d-de = Legt das Padding des eingeklappten Materials im farbigen Bereich fest. (in px) | |||
|8label = padding | |8label = padding | ||
|8label-de= Padding | |||
|8type = number | |8type = number | ||
|8def = | |8def = 8 | ||
|8stat = optional- | |8stat = optional- | ||
|9 = width | |9 = width | ||
|9d-en = Sets the width of the overall template | |9d-en = Sets the width of the overall template (in px) | ||
|9d-de = Legt die Breite der gesamten Vorlage fest (in px) | |||
|9label = box width | |9label = box width | ||
|9label-de= Kastenbreite | |||
|9type = number | |9type = number | ||
|9def = <!-- default value for the parameter --> | |9def = <!-- default value for the parameter --> | ||
| Line 69: | Line 87: | ||
|desc = {{redirects|cot|cob}}The collapse template is used for placing collapse boxes around discussions. | |desc = {{redirects|cot|cob}}The collapse template is used for placing collapse boxes around discussions. | ||
|desc-td = The collapse template is used for placing collapse boxes around discussions. | |desc-td = The collapse template is used for placing collapse boxes around discussions. | ||
|desc-de = {{redirects|cot|cob}}Die Klappvorlage wird verwendet, um einklappbare Boxen um Diskussionen herum zu platzieren. | |||
|desc-td-de = Die Klappvorlage wird verwendet, um einklappbare Boxen um Diskussionen herum zu platzieren. | |||
|namespace = talks | |namespace = talks | ||
|usergroup = | |usergroup = all | ||
|placement = | |placement = | ||
|usage-notes = Place {{tl|collapse top}} and {{tl|collapse bottom}} around the text to be collapsed. If an entire section is being archived, [[#Archiving a section|remove the section header and add it as the first parameter of the template]]. This keeps the section header from showing in the TOC. | |usage-notes = {{LangSwitch | ||
|en=Place {{tl|collapse top}} and {{tl|collapse bottom}} around the text to be collapsed. If an entire section is being archived, [[#Archiving a section|remove the section header and add it as the first parameter of the template]]. This keeps the section header from showing in the TOC. | |||
|de=Platziere {{tl|collapse top}} und {{tl|collapse bottom}} um den Text, der eingeklappt werden soll. Wenn ein ganzer Abschnitt archiviert wird, [[#Archiving a section|entferne die Abschnittsüberschrift und füge sie als ersten Parameter der Vorlage hinzu]]. So wird die Abschnittsüberschrift nicht im Inhaltsverzeichnis angezeigt. | |||
}} | |||
|type = | |type = | ||
|example = | |example = | ||
|example-value = | |example-value = | ||
|i18n-method = | |i18n-method = ext.translate | ||
|i18n-desc = | |i18n-desc = | ||
|i18n-mediawiki-msg = | |i18n-mediawiki-msg = | ||
|i18n-subpage = | |i18n-subpage = i18n | ||
|seealso = * {{Tl|collapse}} | |seealso = * {{Tl|collapse}} | ||
* {{Tl|collapse top}}, {{Tl|collapse bottom}} | * {{Tl|collapse top}}{{,}}{{Tl|collapse bottom}} | ||
* {{tl|discussion top}} | * {{tl|discussion top}} | ||
|setscats = | |setscats = | ||
Latest revision as of 08:46, 29 December 2025
Usage
{{Collapse top}}
Place {{Collapse top}} and {{Collapse bottom}} around the text to be collapsed. If an entire section is being archived, remove the section header and add it as the first parameter of the template. This keeps the section header from showing in the TOC.
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1title reason header heading | header | These parameters give the main title of collapsed box, which occurs on the same line as the show link and is always visible. | empty | optional |
warning | show warning text | If this parameter evaluates to true (i.e. is not 0, false, or empty) it will display a default warning line under the main title which reads “The following is an archived debate. Please do not modify it.” (except if parameter #2 is given). | empty | optional |
2 | custom warning text | This is optional warning-line text. It will override the standard warning line above, and obviate the need for setting the 'warning' parameter. | empty | optional |
expand | expand | If this parameter evaluates to true (i.e. is not 0, false, or empty) it will leave the material uncollapsed with the border and coloring. Default is to collapse the material. However, when previewing edits, content will always display as uncollapsed; this is often helpful, but also often confusing! | empty | optional |
bg | background color | Sets the background color of the collapsed material | #CFC | optional |
border | border width | Sets the width of the border line on the collapsed material. (in px) | 1 | optional |
b-color | border color | Sets the border color. | silver | optional |
padding | padding | Sets the padding on the collapsed material in the colored area. (in px) | 8 | optional |
width | box width | Sets the width of the overall template (in px) | empty | optional |
|
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information The collapse template is used for placing collapse boxes around discussions.
| ||||||||||||||||||||||||||||||||||||||||||||||||||
Additional information
The template is intended to be used in the following namespaces: all talk namespaces and noticeboards
The template is intended to be used by the following user groups: all users
See also
Localization
العربية ∙ Deutsch ∙ English ∙ français ∙ हिन्दी ∙ македонски ∙ Nederlands
This template makes use of {{Autotranslate}} and the translate extension.
Examples
Simple
{{Collapse top|This is the title text}}
{{lorem ipsum}}
{{Collapse bottom}}
This is the title text
|
|---|
|
Lorem ipsum dolor sit amet, consectetur adipisicing 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. |
Changing background color
{{Collapse top|bg=#F0F2F5}} or {{cot|bg=#F0F2F5}}
Extended content
|
|---|
|
Lorem ipsum dolor sit amet, consectetur adipisicing 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. |
Changing border color
{{cot|b-color=#ff0000}}
Extended content
|
|---|
|
Lorem ipsum dolor sit amet, consectetur adipisicing 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. |
Adding extra padding
{{cot|padding=40px}}
Extended content
|
|---|
|
Lorem ipsum dolor sit amet, consectetur adipisicing 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. |
Adding a warning line
{{cot|default warning|warning=1}}
default warning
|
|---|
| The following is a closed debate. Please do not modify it. |
|
Lorem ipsum dolor sit amet, consectetur adipisicing 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. |
{{cot|custom warning|this is a custom warning line}}
custom warning
|
|---|
| this is a custom warning line |
|
Lorem ipsum dolor sit amet, consectetur adipisicing 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. |
Archiving a section
{{cot}}
==section header==
text
{{cob}}
rewritten as
{{cot|section header}}
text
{{cob}}
section header
|
|---|
|
text |