模板:Template category/doc

来自Local Chinese Wikipedia
imported>Kcx362025年7月13日 (日) 08:31的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转到导航 跳转到搜索

页面Module:Message box/mbox.css没有内容。

{{Template category}}应该放置于归类模板页面及相关子页面的分类的顶端。

用法[编辑]

完整语法[编辑]

{{Template category
| type = 
| topic = 
| description = 
| rhs = 
| container = 
| help = 
}}

参数[编辑]

本模板可以不设参数直接使用,即使用代码{{Template category}}

不设参数
页面Module:Message box/mbox.css没有内容。

下面是可用于使本模板提供更多实用信息的参数:

type[编辑]


设置type为(目前的)十一个值之一,会显示分类用于归类的模板类型的预设说明。这些值有:
  • ambox
  • campaignbox
  • conversion
  • external link
  • formatting
  • function
  • meta
  • navbox
  • navigation
  • sidebar
  • stub
  • timeline
  • userbox
type设置为了不是这些值的其他内容,默认的说明“在本分类中列出的页面为模板”会原样显示。
只设type
{{Template category |type=sidebar}}
页面Module:Message box/mbox.css没有内容。
更多type的输出示例请见下面的示例。

topic[编辑]


添加默认说明“与topic相关的模板”,其中topic通常为与分类相关的主条目的wikilink。(如美国Category:美国模板
只设topic
{{Template category |topic=[[美国]]}}
页面Module:Message box/mbox.css没有内容。
typetopic
{{Template category |type=infobox |topic=[[美国]]}}
页面Module:Message box/mbox.css没有内容。

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}}.}}
}}
页面Module:Message box/mbox.css没有内容。
只设description
{{Template category |description=This text is supplied by the ''description'' parameter.}}
页面Module:Message box/mbox.css没有内容。

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|美国}}
}}
页面Template:Sister project/styles.css没有内容。页面Module:Message box/mbox.css没有内容。

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}}
页面Module:Message box/mbox.css没有内容。
An alternative to using container is to place {{Parent category}} after the {{Template category}} template:
{{Parent category}}跟随{{Template category}}
{{Template category
| type = ''type''
| topic = ''[[topic]]''
| description = 这是''description''参数提供的文字。
}}
{{Parent category}}
页面Module:Message box/mbox.css没有内容。 页面Module:Message box/mbox.css没有内容。

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.

参见[编辑]

其他分类顶部模板[编辑]

package.lua第80行Lua错误:module 'Module:NavboxV2/NavboxContext' not found