Template:Collapse top/doc: Difference between revisions
rv 629387142 by 70.39.185.179 (talk)
w:en>John Cline (rv erroneous edit - Undid revision 629386966 by 70.39.185.179 (talk)) |
w:en>Mrjulesd (rv 629387142 by 70.39.185.179 (talk)) |
||
Line 41: | Line 41: | ||
If an entire section is being closed, remove the section header and add it as the first parameter of the template. This keeps the section header from showing in the TOC. For example <code><nowiki>{{cot|Section header}}</nowiki></code> | If an entire section is being closed, remove the section header and add it as the first parameter of the template. This keeps the section header from showing in the TOC. For example <code><nowiki>{{cot|Section header}}</nowiki></code> | ||
== Examples == | |||
*Adding a box title (if omitted, default is 'Extended content') - <code><nowiki>{{cot|This is the title text}}</nowiki></code> | |||
{{cot|This is the title text}} | |||
{{lorem ipsum}} | |||
{{cob}} | |||
*Adding a standard warning line - <code><nowiki>{{cot|This is the title text|warning=true}}</nowiki></code> | |||
{{cot|This is the title text|warning=true}} | |||
{{lorem ipsum}} | |||
{{cob}} | |||
*Adding a custom warning line - <code><nowiki>{{cot|This is the title text|This is a custom warning line}}</nowiki></code> | |||
{{cot|This is the title text|This is a custom warning line}} | |||
{{lorem ipsum}} | |||
{{cob}} | |||
*Aligning box title along left margin - <code><nowiki>{{collapse top|left=true}} or {{cot|left=true}}</nowiki></code> | |||
{{cot|left=true}} | |||
{{lorem ipsum}} | |||
{{cob}} | |||
*Changing background color - <code><nowiki>{{collapse top|bg=#F0F2F5}} or {{cot|bg=#F0F2F5}}</nowiki></code> | |||
{{cot|bg=#F0F2F5}} | |||
{{lorem ipsum}} | |||
{{cob}} | |||
*Adding extra padding - <code><nowiki>{{cot|padding=40px}}</nowiki></code> | |||
{{cot|padding=40px}} | |||
{{lorem ipsum}} | |||
{{cob}} | |||
*Archiving a section: the markup below: | |||
<pre>{{cot}} | |||
==Section header== | |||
Sample contents text | |||
{{cob}}</pre> | |||
must be rewritten as: | |||
<pre>{{cot|Section header}} | |||
Sample contents text | |||
{{cob}}</pre> | |||
The end result: | |||
{{cot|Section header}} | |||
Sample contents text | |||
{{cob}} | |||
== Redirects == | == Redirects == | ||
To Collapse top: | To Collapse top: |