Шаблон:Collapse/doc: различия между версиями
en>SMcCandlish (typo) |
en>SMcCandlish (→Around header text: hmph) |
||
| Строка 33: | Строка 33: | ||
=== Around header text === | === Around header text === | ||
When used with a section of text, include the section header in the collapsed portion of text. For example, given: | When used with a section of text, include the section header in the collapsed portion of text. For example, given:{{Clarify|date=January 2010|reason=This example code, ripped and modified from [[Template:Collapse top/doc]], appears to be broken here.}} | ||
{{Divbox|green|Example text|== [[Help:Section|Heading]] ==<br />{{Lorem ipsum}}}} | {{Divbox|green|Example text|== [[Help:Section|Heading]] ==<br />{{Lorem ipsum}}}} | ||
Версия 05:09, 12 января 2010
Шаблон:Documentation subpage Шаблон:Shortcut
The Collapse template is used for placing collapse boxes around discussions.
Usage
Note: {{Collapse}} and {{Collapse bottom}} need to be substed in order for the time stamp functionality to work properly.
It is definitely safest to use the named |{{SAFESUBST:#if:1|1=}} and |{{SAFESUBST:#if:2|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
{{Collapse|1=Discussion text to be put into box.|bg=#F0F2F5}} creates:
{{safesubst:#ifeq:%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD||}}
The padding parameter
The padding parameter adjusts the amount of cell padding (defaults to 8px):
{{Collapse|1=Discussion text to be put into box.|padding=20}} creates:
{{safesubst:#ifeq:%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD||}}
Around header text
When used with a section of text, include the section header in the collapsed portion of text. For example, given:Шаблон:Clarify
Replace with:
The expand parameter
Simply add |{{SAFESUBST:#if:expand|expand=}}yes to have the box show up in expanded form with a "hide" link, instead of collapsed form with a "show" link. Note: |{{SAFESUBST:#if:expand|expand=}}no does not work, which is lame; to disable the feature, you have to remove the entire |{{SAFESUBST:#if:|=}}expand parameter and value.
See also
- {{collapse top}}
- {{collapse bottom}}
- {{discussion top}}
- {{archive top}}
- {{hidden archive top}}