Template:Category main article/doc

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Script error: No such module "Message box". Script error: No such module "Shortcut". Script error: No such module "High-use". Template:Lua

Usage

This template is for use on Category pages, to refer to the primary article associated with this category, which most of the time, describes the entire set containing the category.

This template is not a replacement for adding a category to the main article. The main article of a category should always have the category set. Furthermore, the main article should always have a space as sort key so that it appears on top of a category. Example: the article Internet should have the category [[Category:Internet| ]].

Normal usage (uses category name for wiki link):

  • Template:Tlx results in Script error: No such module "Category main article".

If the name of the main article is different than the name of the category Template:-- for example: if the main article for Category: Dead or Alive (series) is Dead or Alive (franchise) — then you will need to use one parameter to specify the article:

  • Template:Tlx results in Script error: No such module "Category main article".

Multiple articles

Simply append more articles as additional arguments (up to five):

  • Template:Tlx results in Script error: No such module "Category main article".
  • Template:Tlx results in Script error: No such module "Category main article".
  • Template:Tlx results in Script error: No such module "Category main article".

Pages which aren't articles

The template should automatically detect titles being outside the article namespace, but this may also be set manually:

  • Template:Tlx results in Script error: No such module "Category main article".

Plurals and other redirects

If the mainspace page corresponding to the category is a redirect, it will be automatically bypassed by default. For example Category:Wildfires corresponds to Wildfires which redirects to Wildfire. If Category:Wildfires used Template:Tlx without any arguments, it would still display and link Wildfire not Wildfires to respect the convention.

TemplateData

Template:TemplateData header

Specifies the primary article(s) associated with this category

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Article 11

Name of primary article, if different from category name

Page nameoptional
Article 22

Name of second main article

Page nameoptional
Article 33

Name of third main article

Page nameoptional
Article 44

Name of fourth main article

Page nameoptional
Article 55

Name of fifth main article

Page nameoptional

See also

Template:Category hatnote templates