Template:Template category/doc
外观
此頁面是Template:Template category的Template文档。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
{{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
{{Template category |type=infobox |topic=[[美国]]}}
與美国有關的infobox模板。
|
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.
参见
[编辑]其他分類頂部模板
[编辑]