Template:Collapsed infobox section begin/sandbox
![]() | 这是Template:Collapsed infobox section begin(差异)的沙盒。 |
摺疊模板 | ||||
---|---|---|---|---|
|
||||
正文命名空间 | ||||
|
||||
信息框 | ||||
导航模板 | ||||
讨论命名空间 | ||||
This template is used with {{collapsed infobox section end}}
to create a collapsed section in an infobox. This is not the same as {{hidden}}, which can be used to collapse an infobox, or {{collapsible list}}, which collapses a single list within an infobox.
Usage
[编辑]Place {{collapsed infobox section begin}}
before the first line of the collapsed section (typically in the caption, for an infobox with an image), and place {{collapsed infobox section end}}
after the last line of the collapsed section (typically just after the website or footnotes).
Parameters
[编辑]The template has one optional unnamed parameter that is the title used for the collapsed section.
{{collapsed infobox section begin|Heading}}
If omitted, the template will use the default heading, "Further information
".
The template has two optional named parameters for adjusting the style. To change the style for the section title, use |titlestyle=
. To change the style for the collapsed table, use |style=
.
Setting |expanded=yes
will make the section expanded by default.
Example
[编辑]Tim Template | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() Tim in 2012
| |||||||||||
|
{{Infobox person | name = Tim Template | image = wikipedia.png | caption = Tim in 2012 {{collapsed infobox section begin|Biographical data|titlestyle=background-color:#eee}} | birth_date = {{birth date and age|2000|1|1}} | alma_mater = Wikipedia | website = {{official website|www.wikipedia.org}}<!-- -->{{collapsed infobox section end}} }}
Warnings
[编辑]If either the begin or end templates are not properly transcluded, disaster may strike, causing the infobox to either swallow the article (missing the end template), or terminate unexpectedly (missing the begin template).
As with all collapsed content, if there are references to citations (<ref>...</ref>
) inside collapsible sections, readers cannot jump to the location of the reference using the backlinks (^ or na b c ...) at the citation. Backlinks will only work when the collapsible section(s) is/are expanded. The same is true for citations within a collapsed {{collapsible list}} or {{hidden}} template or any collapsed content.
參見
[编辑]- {{hidden}}, {{hidden begin}}, and {{hidden end}}
- {{Collapsible list}}
- {{Infobox}}
上述文档嵌入自Template:Collapsed infobox section begin/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (编辑 | 差异)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |