Template:Collapse top/doc: Difference between revisions
Jump to navigation
Jump to search
revising docs, removing (incomprehensible) timestamp instruction, adding new parameters, examples.
w:en>Ludwigs2 (reorganizing and strengthening) |
w:en>Ludwigs2 (revising docs, removing (incomprehensible) timestamp instruction, adding new parameters, examples.) |
||
Line 3: | Line 3: | ||
{{shortcut|Template:Cot|Template:Cob}} | {{shortcut|Template:Cot|Template:Cob}} | ||
The Collapse template is used for placing collapse boxes around discussions. | The Collapse template is used for placing collapse boxes around discussions. It is a two-part template, used in conjunction with {{tl|Collapse bottom}} ({{tl|cob}}). | ||
This template should only be used in accordance with the [[Wikipedia:refactoring]] guideline; it should never be used to to end a discussion over the objections of other editors, except in cases of unambiguous disruptive editing. | This template should only be used in accordance with the [[Wikipedia:refactoring]] guideline; it should never be used to to end a discussion over the objections of other editors, except in cases of unambiguous disruptive editing. | ||
== Usage == | == Usage == | ||
Place {{tl|Collapse top}} and {{tl|Collapse bottom}} arounf the text to be collapsed. example: | |||
<pre>{{Collapse top|This is the title text}} | |||
{{lorem ipsum}} | |||
{{Collapse bottom}}</pre> | |||
produces | |||
{{Collapse top|Title text}} | |||
{{lorem ipsum}} | |||
{{Collapse bottom}} | |||
== Parameters == | |||
This template takes the following parameters, all of which are optional | |||
<span style=" | ;''positional parameter 1'', named parameter 'title': These parameters give the main title of collapsed box, which occurs on the same line as the ''show'' link and is always visible. It defaults to 'Extended content'. | ||
;warning: 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>' | |||
;''positional parameter 2'': This is optional warning-line text. It will override the standard warning line above, and obviate the need for setting the 'warning' parameter. | |||
;'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. | |||
;'bg': Sets the background color of the collapsed material. Defaults to #CFC - a pleasant green. | |||
;'border': Sets the width of the border line on the collapsed material. defaults to 1px. | |||
;'padding': Sets the padding on the collapsed material in the colored area. defaults to 8 px | |||
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. | |||
== Examples == | |||
== | |||
<nowiki>{{Collapse top|bg=#F0F2F5}} or {{cot|bg=#F0F2F5}}</nowiki> | *changing background color - <nowiki>{{Collapse top|bg=#F0F2F5}} or {{cot|bg=#F0F2F5}}</nowiki> | ||
{{cot|bg=#F0F2F5}} | {{cot|bg=#F0F2F5}} | ||
{{lorem ipsum}} | |||
{{cob}} | |||
*adding extra padding - <nowiki>{{cot|padding=40px}}</nowiki> | |||
{{cot|padding=40px}} | |||
{{lorem ipsum}} | |||
{{cob}} | |||
*adding a warning line - <nowiki>{{cot|default warning|warning=1}}</nowiki>, <nowiki>{{cot|custom warning|this is a custom warning line}}</nowiki> | |||
{{cot|default warning|warning=1}} | |||
{{lorem ipsum}} | |||
{{cob}} | |||
{{cot|custom warning|this is a custom warning line}} | |||
{{lorem ipsum}} | |||
*archiving a section | |||
<pre>{{cot}} | |||
==section header== | |||
text | |||
{{cob}}</pre> | |||
rewritten as | |||
<pre>{{cot|section header}} | |||
text | |||
{{cob}}</pre> | |||
{{cot|section header}} | |||
text | |||
{{cob}} | |||
{{cob}} | {{cob}} | ||
==General information== | ==General information== | ||
Line 48: | Line 64: | ||
== Redirects == | == Redirects == | ||
* {{Tl|DAT}} | * {{Tl|DAT}} | ||
* {{tl|hidden archive top}} | |||
== See also == | == See also == | ||
Line 54: | Line 71: | ||
* {{tl|discussion top}} | * {{tl|discussion top}} | ||
* {{tl|archive top}} | * {{tl|archive top}} | ||
<includeonly> | <includeonly> |