< Template:Template category(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
{{#if:
|
{{#if:x||
}}
|{{#ifeq: doc | doc
|
{{
#ifeq: show | show
| {{
{{#switch:
{{#if:
|
| {{#if:
|
{{#ifeq:|
| talk
|
}}
|
{{#ifeq:template|template talk
| talk
| template
}}
}}
}}
| main
| = ambox
| talk = tmbox
| user = ombox
| wikipedia = ombox
| file
| image = imbox
| mediawiki = ombox
| template = ombox
| help = ombox
| category = cmbox
| portal = ombox
| book = ombox
| other
| #default = ombox
}}
| type = notice
| image = none
| imageright =
| class =
| style =
| textstyle =
| text = This is a documentation subpage for Template:Template category (see that page for the {{ #if: Template | template | article }} itself).
It contains usage information, categories and other content that is not part of the original {{ #if: Template |template page|article}}.
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
}}
}}{{
#if:
|
| [[Category:{{
#if: Template
| Template
| Article
}} documentation]]
}}
|
}}
}}
The {{template category}} template should be placed at the top of categories that contain only template pages and their related subcategories.
Usage
Full syntax
{{template category |type= |topic= |description= |help= }}
Parameters
The following parameters that are all optional, may also be used:
- type
- Adds a note as to which type of template the category (but not necessarily its subcategories) is meant to contain, e.g.
{{template category |type=navbox}}
- Currently, setting type to one of eleven values produces a preset note. The values are:
amboxTemplate:· campaignboxTemplate:· conversionTemplate:· external linkTemplate:· formatting
functionTemplate:· infoboxTemplate:· metaTemplate:· navboxTemplate:· stubTemplate:· timelineTemplate:· userbox
- If type is set to something other than one of these values, the default message "The pages listed in this category are meant be type templates." appears.
- topic
- Adds the default description "Templates relating to topic.", where topic is usually a wikilink to the main article associated with the category (e.g. United States for the category Template:C). See Example 1 below.
- description
- Use this if a customised description is needed instead of (or, if topic also used, to follow) the default description above. See Example 2 below.
- help
- Use this to provide customised instructions rather than the default explanation as to how to add a template to the category.
- container
- Use this if the category is a container category by adding
|{{#if:container|container=|}}yes
to the template.
Examples
Example 1
{{template category
|type = navbox
|topic = the [[United States]]
}}
{{#ifeq:
Template braces|none
|
|
}}
{{#if:
|
}}
|
{{#if:Template braces
| Template braces
| [[File:{{#switch:notice
| speedy = Cmbox deletion.png
| delete = Cmbox deletion.png
| content = Cmbox content.png
| style = Edit-clear.svg
| move = Cmbox move.png
| protection = Cmbox protection.png
| notice
| #default = Cmbox notice.png
}}|40x40px|link=|alt=]]
}} |
{{#if:the United States
|
}}
{{#if: the United States |Templates relating to the United States. }} |
{{#if:navbox
| The pages listed in this category are meant to be {{#switch:navbox
|ambox = article message box (ambox) templates.
|campaignbox = campaignbox templates.
|conversion = templates that perform conversions.
|external link = templates providing external links.
|formatting = templates that provide formatting.
|function = function templates, i.e. templates that produce text, images or other elements.
|infobox = infobox templates.
|meta = metatemplates.
|navbox = navigational (navbox) templates. If subcategories exist for other types of templates (e.g. infoboxes) that relate to this topic, they should appear at the start of the subcategories listing immediately below this messagebox.
|stub = stub templates.
|timeline = timeline templates.
|userbox = userbox templates.
|#default =
|navbox templates.
}}
| The pages listed in this category are templates. {{#if: |
{{{ALTTEXT}}} }}
}}
{{#if:
| {{#ifeq:| no | |}}
|
}}
{{#if:Further template category notes
|Further template category notes
|110%
}} |
This category contains pages in the template namespace. It should not be used to categorize articles or pages in other namespaces. |
{{#ifeq:|yes|Do not add templates to this category: instead, use the appropriate sub-category.|{{{help}}}}} | To include a template in this category, add
[[Template:Template category/doc]] to the <includeonly> section at the bottom of the template's /doc subpage if such a page exists. Otherwise, add
<noinclude>[[Template:Template category/doc]]</noinclude> to the end of the template code, making sure it starts on the same line as the last character of the code. |
|
|
{{{imageright}}} |
{{#switch:notice
|
| speedy
| delete
| content
| style
| move
| protection
| notice =
| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
}}{{#ifeq:Template|Category|}}
Example 2
{{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}}.</small>
}}
{{#ifeq:
Template braces|none
|
|
}}
{{#if:
|
}}
|
{{#if:Template braces
| Template braces
| [[File:{{#switch:notice
| speedy = Cmbox deletion.png
| delete = Cmbox deletion.png
| content = Cmbox content.png
| style = Edit-clear.svg
| move = Cmbox move.png
| protection = Cmbox protection.png
| notice
| #default = Cmbox notice.png
}}|40x40px|link=|alt=]]
}} |
{{#if: ChinaFor templates relating specifically to the People's Republic of China (PRC) or the current Republic of China (ROC, "Taiwan"), see, respectively, Template:C and Template:C.
|
}}
{{#if: China |Templates relating to China. }} For templates relating specifically to the People's Republic of China (PRC) or the current Republic of China (ROC, "Taiwan"), see, respectively, Template:C and Template:C. |
{{#if:navbox
|
| The pages listed in this category are templates. {{#if: |
{{{ALTTEXT}}} }}
}}
{{#if:
| {{#ifeq:| no | |}}
|
}}
{{#if:Further template category notes
|Further template category notes
|110%
}} |
This category contains pages in the template namespace. It should not be used to categorize articles or pages in other namespaces. |
{{#ifeq:|yes|Do not add templates to this category: instead, use the appropriate sub-category.|{{{help}}}}} | To include a template in this category, add
[[Template:Template category/doc]] to the <includeonly> section at the bottom of the template's /doc subpage if such a page exists. Otherwise, add
<noinclude>[[Template:Template category/doc]]</noinclude> to the end of the template code, making sure it starts on the same line as the last character of the code. |
|
|
{{{imageright}}} |
{{#switch:notice
|
| speedy
| delete
| content
| style
| move
| protection
| notice =
| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
}}{{#ifeq:Template|Category|}}
Example 3
{{template category
|description = Here's a ''description'' without a preceding ''topic'' statement.
}}
{{#ifeq:
Template braces|none
|
|
}}
{{#if:
|
}}
|
{{#if:Template braces
| Template braces
| [[File:{{#switch:notice
| speedy = Cmbox deletion.png
| delete = Cmbox deletion.png
| content = Cmbox content.png
| style = Edit-clear.svg
| move = Cmbox move.png
| protection = Cmbox protection.png
| notice
| #default = Cmbox notice.png
}}|40x40px|link=|alt=]]
}} |
{{#if:Here's a description without a preceding topic statement.
|
}}
{{#if: |Templates relating to {{{topic}}}. }}Here's a description without a preceding topic statement. |
{{#if:
| The pages listed in this category are meant to be {{#switch:{{{type}}}
|ambox = article message box (ambox) templates.
|campaignbox = campaignbox templates.
|conversion = templates that perform conversions.
|external link = templates providing external links.
|formatting = templates that provide formatting.
|function = function templates, i.e. templates that produce text, images or other elements.
|infobox = infobox templates.
|meta = metatemplates.
|navbox = navigational (navbox) templates. If subcategories exist for other types of templates (e.g. infoboxes) that relate to this topic, they should appear at the start of the subcategories listing immediately below this messagebox.
|stub = stub templates.
|timeline = timeline templates.
|userbox = userbox templates.
|#default = Here's a description without a preceding topic statement.
|{{{type}}} templates.
}}
| The pages listed in this category are templates. {{#if: |
{{{ALTTEXT}}} }}
}}
{{#if:
| {{#ifeq:| no | |}}
|
}}
{{#if:Further template category notes
|Further template category notes
|110%
}} |
This category contains pages in the template namespace. It should not be used to categorize articles or pages in other namespaces. |
{{#ifeq:|yes|Do not add templates to this category: instead, use the appropriate sub-category.|{{{help}}}}} | To include a template in this category, add
[[Template:Template category/doc]] to the <includeonly> section at the bottom of the template's /doc subpage if such a page exists. Otherwise, add
<noinclude>[[Template:Template category/doc]]</noinclude> to the end of the template code, making sure it starts on the same line as the last character of the code. |
|
|
{{{imageright}}} |
{{#switch:notice
|
| speedy
| delete
| content
| style
| move
| protection
| notice =
| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
}}{{#ifeq:Template|Category|}}
Example 4
{{template category
|type = external link
|description = '''Templates aiding the creation and formatting of external links to [[topic]] databases.'''
}}
{{#ifeq:
Template braces|none
|
|
}}
{{#if:
|
}}
|
{{#if:Template braces
| Template braces
| [[File:{{#switch:notice
| speedy = Cmbox deletion.png
| delete = Cmbox deletion.png
| content = Cmbox content.png
| style = Edit-clear.svg
| move = Cmbox move.png
| protection = Cmbox protection.png
| notice
| #default = Cmbox notice.png
}}|40x40px|link=|alt=]]
}} |
{{#if: Templates aiding the creation and formatting of external links to topic databases.
|
}}
{{#if: |Templates relating to {{{topic}}}. }}Templates aiding the creation and formatting of external links to topic databases. |
{{#if:external link
| The pages listed in this category are meant to be {{#switch:external link
|ambox = article message box (ambox) templates.
|campaignbox = campaignbox templates.
|conversion = templates that perform conversions.
|external link = templates providing external links.
|formatting = templates that provide formatting.
|function = function templates, i.e. templates that produce text, images or other elements.
|infobox = infobox templates.
|meta = metatemplates.
|navbox = navigational (navbox) templates. If subcategories exist for other types of templates (e.g. infoboxes) that relate to this topic, they should appear at the start of the subcategories listing immediately below this messagebox.
|stub = stub templates.
|timeline = timeline templates.
|userbox = userbox templates.
|#default = Templates aiding the creation and formatting of external links to topic databases.
|external link templates.
}}
| The pages listed in this category are templates. {{#if: |
{{{ALTTEXT}}} }}
}}
{{#if:
| {{#ifeq:| no | |}}
|
}}
{{#if:Further template category notes
|Further template category notes
|110%
}} |
This category contains pages in the template namespace. It should not be used to categorize articles or pages in other namespaces. |
{{#ifeq:|yes|Do not add templates to this category: instead, use the appropriate sub-category.|{{{help}}}}} | To include a template in this category, add
[[Template:Template category/doc]] to the <includeonly> section at the bottom of the template's /doc subpage if such a page exists. Otherwise, add
<noinclude>[[Template:Template category/doc]]</noinclude> to the end of the template code, making sure it starts on the same line as the last character of the code. |
|
|
{{{imageright}}} |
{{#switch:notice
|
| speedy
| delete
| content
| style
| move
| protection
| notice =
| #default =
This message box is using an invalid "type=notice" parameter and needs fixing.
}}{{#ifeq:Template|Category|}}
See also
Template:Namespace category