Dominion Atlantic Railway Digital Preservation Initiative - Wiki

Use of this site is subject to our Terms & Conditions.

Template:Template category/doc

From DARwiki

{{#if: |

40px This is the template documentation page for Template:Template category.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.

{{#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:

|

}}

{{#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:

|

}}

{{#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:

|

}}

{{#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:

|

}}

{{#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