模板:Template category/sandbox
|
这是Template:Template category(差异)的沙盒。 |
{{Template category}}应该放置于归类模板页面及相关子页面的分类的顶端。
用法
完整语法
{{Template category | type = | topic = | description = | rhs = | container = | help = }}
参数
本模板可以不设参数直接使用,即使用代码{{Template category}}
。
不设参数
下面是可用于使本模板提供更多实用信息的参数:
type
- 设置type为(目前的)十一个值之一,会显示分类用于归类的模板类型的预设说明。这些值有:
- ambox
- campaignbox
- conversion
- external link
- formatting
- function
- meta
- navbox
- navigation
- sidebar
- stub
- timeline
- userbox
- 若type设置为了不是这些值的其他内容,默认的说明“在本分类中列出的页面为模板”会原样显示。
只设type
{{Template category |type=sidebar}}
本分类是用于管理维基百科的页面,并非百科全书的一部分。
|
- 更多type的输出示例请见下面的示例。
topic
- 添加默认说明“与topic相关的模板”,其中topic通常为与分类相关的主条目的wikilink。(如美国与Category:美国模板)
只设topic
{{Template category |topic=[[美国]]}}
与美国有关的模板。
|
type,topic
description
- Use this if a customised description is needed instead of – or, if topic also used, to follow – the default description above.
type, topic, description
{{Template category | type = navbox | topic = [[China]] | description = <br/>{{small|For templates relating specifically to the [[People's Republic of China|People's Republic of China (PRC)]] or the current [[Republic of China|Republic of China (ROC, "Taiwan")]], see, respectively, {{c|People's Republic of China templates}} and {{c|Republic of China (Taiwan) templates}}.}} }}
与China有关的navbox模板。 For templates relating specifically to the People's Republic of China (PRC) or the current Republic of China (ROC, "Taiwan"), see, respectively, People's Republic of China templates and Republic of China (Taiwan) templates. 本分类是用于管理维基百科的页面,并非百科全书的一部分。
|
只设description
{{Template category |description=This text is supplied by the ''description'' parameter.}}
This text is supplied by the description parameter. |
onright / rhs
- Use this to place right-aligned boxes beside the template, such as {{portal}} (to provide a link or links to related portal or portals) and/or {{Commons category}} (to provide a link to the same or a similarly-named category at the Commons). If more than one box is included, ensure the widest one appears first (see example below) otherwise overlapping may occur.
topic, rhs
{{Template category | topic = [[美国]] | rhs = {{Commons category|United States|美国}}{{portal|美国}} }}
与美国有关的模板。
|
container
- Set container to "true" (without quotemarks) to identify the category as a container category, i.e. a category meant to contain only subcategories. A note requesting that no templates are added to the template category is then included.
只设container
{{Template category |container=true}}
注:请勿直接将模板加入本分类,正确的做法是将其加入下列子分类之一。
|
- An alternative to using container is to place {{Parent category}} after the {{Template category}} template:
{{Parent category}}跟随{{Template category}}
help
- Use this to replace the default instructions as to how to add a template to the category (see the "Further template category notes" section) or, if set to nothing, remove them.