Шаблон:Collapse/doc: различия между версиями

Перейти к навигации Перейти к поиску
1498 байт добавлено ,  05:07, 12 января 2010
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:
{{template doc page}}
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{shortcut|Template:Cot|Template:Cob}}


You can use this for an easy collapsible box. Just use <code><nowiki>{{collapse|your table}}</nowiki></code> to get a show/hide option. The <code>size</code> parameter can be specified (just the number) (default 235px), as can the <code>style</code> parameter (default "background:transparent") and the <code>class</code> parameter (default wikitable; you can also choose another form.)
The Collapse template is used for placing collapse boxes around discussions.


=== See also ===
== Usage ==


* {{tl|collapse top}} / {{tl|collapse bottom}}
'''''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|&#x3d;&#x3d; [[Help:Section|Heading]] &#x3d;&#x3d;<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>
<!-- ADD CATEGORIES BELOW THIS LINE -->
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Archival templates|{{PAGENAME}}]]
[[Category:Collapse templates|{{PAGENAME}}]]
[[Category:Collapse templates|{{PAGENAME}}]]


<!-- ADD INTERWIKIS BELOW THIS LINE -->
[[hu:Sablon:Doboz2]]
 
</includeonly>
</includeonly>
Анонимный участник

Навигация