Шаблон:Collapse/doc: различия между версиями
Перейти к навигации
Перейти к поиску
saving new dox; if template code change reverted, revert this too
en>William Allen Simpson м (category sort) |
en>SMcCandlish (saving new dox; if template code change reverted, revert this too) |
||
| Строка 1: | Строка 1: | ||
{{ | {{Documentation subpage}} | ||
<!-- | <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | ||
{{shortcut|Template:Cot|Template:Cob}} | |||
The Collapse template is used for placing collapse boxes around discussions. | |||
== | == Usage == | ||
* {{ | '''''Note: {{Tl|Collapse}} and {{Tl|Collapse bottom}} need to be substed in order for the time stamp functionality to work properly.''''' | ||
{{Tlp|Collapse|1=<var>Discussion text to be put into box.</var>|2=<var>Optional custom heading</var>}} | |||
It is definitely safest to use the named {{para|1}} and {{para|2}} parameters, because otherwise any "=" character will break the template. | |||
=== The bg parameter === | |||
The bg parameter is Optional. It changes the background color. use [[Web color]] values (e.g. #F0F2F5). | |||
;Example: | |||
{<nowiki />{Collapse|1=<var>Discussion text to be put into box.</var>|bg=#F0F2F5}<nowiki />} creates: | |||
{{Collapse|1=Discussion text to be put into box.|bg=#F0F2F5}} | |||
=== The padding parameter === | |||
The padding parameter adjusts the amount of cell padding (defaults to 8px): | |||
{<nowiki />{Collapse|1=<var>Discussion text to be put into box.</var>|padding=20}<nowiki />} creates: | |||
{{Collapse|1=Discussion text to be put into box.|padding=20}} | |||
=== Around header text === | |||
When used with a section of text, include the section header in the collapsed portion of text. For example, given: | |||
{{Divbox|green|Example text|== [[Help:Section|Heading]] ==<br />{{Lorem ipsum}}}} | |||
Replace with: | |||
{{Divbox|tt|Changed to|{{Tlsp|Collapse|1={{Lorem ipsum}}|2=[[Help:Section|Heading]]}} | |||
===The expand parameter=== | |||
Simply add {{para|expand|yes}} to have the box show up in expanded form with a "hide" link, instead of collapsed form with a "show" link. Note: {{para|expand|no}} does not work, which is lame; to disable the feature, you have to remove the entire {{para||expand}} parameter and value. | |||
== See also == | |||
* {{Tl|collapse top}} | |||
* {{Tl|collapse bottom}} | |||
* {{tl|discussion top}} | |||
* {{tl|archive top}} | |||
* {{tl|hidden archive top}} | |||
<includeonly> | <includeonly> | ||
<!-- | <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | ||
[[Category:Archival templates|{{PAGENAME}}]] | |||
[[Category:Collapse templates|{{PAGENAME}}]] | [[Category:Collapse templates|{{PAGENAME}}]] | ||
[[hu:Sablon:Doboz2]] | |||
</includeonly> | </includeonly> | ||