Changes

Jump to navigation Jump to search
Add missing type parameter values
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->

{{tl|Template category}} should be placed at the top of categories that contain template pages and their related subcategories. This template populates [[:Category:Wikipedia template categories]].

{{TOC limit|3}}

== Usage ==

===Full syntax===
<pre style="overflow:auto;">
{{Template category
| type =
| topic =
| description =
| onright =
| container =
| help =
}}
</pre>

===Parameters===
The template may be used without any parameters, i.e. as {{tc|Template category}}.

{{Hidden begin |showhide=left |title=With no parameters |bodystyle=font-size:105%;}}
{{Template category}}
{{Hidden end}}

The following, however, may be used to make the template more informative:

====''type''====
<hr/>
: Setting ''type'' to one of the following values adds a preset note as to which type of template the category (but not necessarily its subcategories) is meant to contain. The values are:
:: '''{{hlist |ambox |campaignbox |category header |conversion |external link |formatting |function |infobox |<s>message</s> |meta |module |navbox |navigation |sidebar |stub |sub |timeline |userbox}}'''
: If ''type'' is set to something other than one of these values, the default "The pages listed in this category are templates" note appears unmodified.

{{Hidden begin |showhide=left |title=''type'' alone |bodystyle=font-size:105%;}}
<pre>{{Template category |type=sidebar}}</pre>
{{Template category |type=sidebar}}
{{Hidden end}}

: Further examples of ''type'''s output appear in the examples below.

====''topic''====
<hr/>
: Use ''topic'' to add a default description ending "...relating to ''topic''", where ''topic'' is usually a [[wikilink]] to the main article associated with the category (e.g. [[United States]] for the [[:Category:United States templates]]).

{{Hidden begin |showhide=left |title=''topic'' alone |bodystyle=font-size:105%;}}
<pre>{{Template category |topic=the [[United States]]}}</pre>
{{Template category |topic=the [[United States]]}}
{{Hidden end}}

{{Hidden begin |showhide=left |title=''type'', ''topic'' |bodystyle=font-size:105%;}}
<pre>{{Template category |type=infobox |topic=the [[United States]]}}</pre>
{{Template category |type=infobox |topic=the [[United States]]}}
{{Hidden end}}

====''description''====
<hr/>
: Use ''description'' if a customised description is needed instead of&nbsp;– or, if ''topic'' also used, to follow&nbsp;– the default description above.

{{Hidden begin |showhide=left |title=''type'', ''topic'', ''description'' |bodystyle=font-size:105%;}}
<pre style="overflow:auto;">
{{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}}.}}
}}
</pre>
{{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}}.}}
}}
{{Hidden end}}

{{Hidden begin |showhide=left |title=''description'' alone |bodystyle=font-size:105%;}}
<pre>{{Template category |description=This text is supplied by the ''description'' parameter.}}</pre>
{{Template category |description=This text is supplied by the ''description'' parameter.}}
{{Hidden end}}

====''onright''====
<hr/>
: Use ''onright'' (or ''rhs'') to place right-aligned boxes beside the template such as {{tl|Portal}} (to provide link/s to related portal/s), {{tl|Commons category}} (to provide a link to the same or a similarly-named Commons category), etc. If more than one box is included, ensure the widest one appears first (see example below) otherwise overlapping may occur.

{{Hidden begin |showhide=left |title=''topic'', ''onright'' |bodystyle=font-size:105%;}}
<pre>
{{Template category
| topic = the [[United States]]
| onright = {{Commons category|United States|the United States}}{{Portal|United States}}
}}
</pre>
{{Template category
| topic = the [[United States]]
| onright = {{Commons category|United States|the United States}}{{Portal|United States}}
}}
{{Hidden end}}

====''container''====
<hr/>
: Set ''container'' as [[Template:Yesno|''true'', ''yes'', etc.]] to identify the category as a [[Wikipedia:Container category|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.

{{Hidden begin |showhide=left |title=''container'' alone |bodystyle=font-size:105%;}}
<pre>{{Template category |container=true}}</pre>
{{Template category |container=true}}
{{Hidden end}}

: An alternative to using ''container'' is to place {{tl|Container category}} after the {{tl|Template category}} template:

{{Hidden begin |showhide=left |title={{braces|Container category}} following {{braces|Template category}} |bodystyle=font-size:105%;}}
<pre>
{{Template category
| type = ''type''
| topic = ''[[topic]]''
| description = This text supplied by the ''description'' parameter.
}}
{{Container category}}
</pre>
{{Template category
| type = ''type''
| topic = ''[[topic]]''
| description = This text supplied by the ''description'' parameter.
}}
{{Container category}}
{{Hidden end}}

====''help''====
<hr/>
: Use ''help'' to replace the instructions on adding a template to the category (second paragraph of the "Further template category notes" section):

{{Hidden begin |showhide=left |title=replace ''help'' text |bodystyle=font-size:105%;}}
<pre>{{Template category |help=This text supplied by the ''help'' parameter.}}</pre>
{{Template category |help=This text supplied by the ''help'' parameter.}}
{{Hidden end}}

: To omit the default instructions, set ''help'' to ''no'':

{{Hidden begin |showhide=left |title=omit ''help'' text |bodystyle=font-size:105%;}}
<pre>{{Template category |help=no}}</pre>
{{Template category |help=no}}
{{Hidden end}}

== See also ==
{{Other category-header templates}}

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Category namespace templates]]
}}</includeonly>
Anonymous user

Navigation menu