• Home
  • Random
  • Log in
  • Settings
  • About Safer nicotine wiki
  • Disclaimers
Safer nicotine wiki

Template:Cat main

  • Language
  • Watch
  • View source
The main article for this category is Cat main.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 178,000 pages.
To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.
This template uses Lua:
  • Module:Cat main

Contents

  • 1 Usage
    • 1.1 Multiple articles
    • 1.2 Pages which aren't articles
  • 2 TemplateData
  • 3 Redirects
  • 4 See also

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):

  • {{Cat main}} →
    The main article for this category is Cat main.

If the name of the main article is different than the name of the category — 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:

  • {{Cat main|Dead or Alive (franchise)}} →
    The main article for this category is Dead or Alive (franchise).

Multiple articles

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

  • {{Cat main|1 BC}} results in
    The main article for this category is 1 BC.
  • {{Cat main|1 BC|2 BC}} results in
    The main articles for this category are 1 BC and 2 BC.
  • {{Cat main|1 BC|2 BC|3 BC|4 BC|5 BC}} results in
    The main articles for this category are 1 BC, 2 BC, 3 BC, 4 BC and 5 BC.

Pages which aren't articles

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

  • {{Cat main|WP:WikiProject|article=no}} →
    The main page for this category is WP:WikiProject.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Cat main in articles based on its TemplateData.

TemplateData for Cat main

Specifies the primary article(s) associated with this category

Template parameters[Edit template data]

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

Redirects

  • {{Category main}}

See also

  • {{Topic cat}}
  • v
  • t
  • e
Hatnote templates for category pages
About
  • {{Category explanation}}
  • {{Cat main}}
  • {{Category main section}}
  • {{Main category}}
  • {{Category more}}
  • {{Category more if exists}}
See also
  • {{Category see also}}
  • {{Category see also if exists}}
  • {{Category see also if exists 2}}
  • {{Category pair}}
  • {{Preceding category}}
  • {{Succeeding category}}
Distinguish
  • {{Category distinguish}}
  • {{Category contrast}}
  • Outline
  • Category:Hatnote templates for category pages
  • See also other category-header templates
The above documentation is transcluded from Template:Cat main/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://safernicotine.wiki/mediawiki/index.php?title=Template:Cat_main&oldid=4287"
Last edited 22 hours ago by Richardpruen
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
More information

Languages

      This page is not available in other languages.

      Safer nicotine wiki
      • This page was last modified on 13 May 2025, at 03:54. Warning: Page may not contain recent updates.
      • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
      • Privacy policy
      • About Safer nicotine wiki
      • Disclaimers
      • Terms of Use
      • Desktop
      • Data access
      • Developers
      • Statistics
      • Cookie statement