模板:Template category/doc

維基教科書,自由的教學讀本

{{Template category}}應該放置於歸類模板頁面及相關子頁面的分類的頂端。

用法[編輯]

完整語法[編輯]

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

參數[編輯]

本模板可以不設參數直接使用,即使用代碼{{Template category}}

下面是可用於使本模板提供更多實用信息的參數:

type[編輯]


設置type為(目前的)十一個值之一,會顯示分類用於歸類的模板類型的預設說明。這些值有:
Template:Hlist
type設置為了不是這些值的其他內容,默認的說明「在本分類中列出的頁面為模板」會原樣顯示。
更多type的輸出示例請見下面的示例。

topic[編輯]


添加默認說明「與topic相關的模板」,其中topic通常為與分類相關的主條目的wikilink。(如美國Category:美國模板

description[編輯]


Use this if a customised description is needed instead of – or, if topic also used, to follow – the default description above.

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.

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.
An alternative to using container is to place {{Parent category}} after the {{Template category}} template:

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.

參見[編輯]

Template:Other category-header templates