• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Category see also if exists

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 71,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template uses Lua:
  • Module:See also if exists

Displays a "see also" link to one or more categories, if the category exists. If none of the supplied categories exists, the template does nothing.

It allows the creation of links to categories which do not yet exist, but which will be displayed if and when the category is created. This is useful as a category tree is being developed, because the editor does not have guess whether a target category is likely to exist any time soon. The link can be created now, rather than having to edit the page again later.

Contents

  • 1 Usage
  • 2 Warning messages
  • 3 Redirects
  • 4 See also

Usage

Usual syntax
{{Category see also if exists|category}}
{{Category see also if exists|category1|category2|category3|...}}

Parameters:

  • At least one category name
Examples
  1. A category which does exist:
    {{Category see also if exists|1997 in Spain}} →
  2. A non-existent category:
    {{Category see also if exists|1997 deaths on Planet Zxcvbmm}} →
  3. A set of categories, some of which exist:
    {{Category see also if exists | Poland | | Spain | asdfghij | Dinosaurs | poiytrewq | zzzzzzzz | Novels }} →
Pragmatic example

Many (most?) sports are segregated by gender. In those sports, men and women either compete separately, or some in specified combination, e.g. in tennis a mixed doubles team must consist of one man and one woman.

WP:Cat gender therefore allows the categories for players of those sports to be sub-divided by gender: one category for men, and one for women.

One such divide is Category:Male boxers/Category:Women boxers.

Category:Estonian boxers has a subcategory for Category:Estonian male boxers, but since there are as yet no en.wikipedia articles on women boxers from Estonia, we do not yet have a Category:Estonian women boxers. So on Category:Estonian male boxers, there is:

  • {{Category see also if exists|Estonian women boxers}} →

Warning messages

If none of the listed categories currently exists, then a warning message is displayed when the page is being previewed: Template:Category see also if exists — no output, because none of the categories currently exists.

This warning is displayed just below the "Preview" heading, and just above the page preview area. It is not displayed when the page has been saved

Redirects

  • {{Cat see also if exists}}

See also

  • {{Category see also if exists 2}} – includes a fallback category which is tried if the first does not exist
  • {{Category see also}}
  • {{Link if exists}}
  • {{Navseasoncats}} – for navigation between categories with years, decades, ordinals, or seasons in their name
  • v
  • t
  • e
Hatnote templates for category pages
About
  • {{Category explanation}}
  • {{Cat main}}
  • {{Category main section}}
  • {{Main category}}
  • {{Cat more}}
  • {{Cat 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:Category see also if exists/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Category_see_also_if_exists&oldid=7410"
Categories:
  • Lua-based templates
  • Exclude in print
  • Conditional link templates
  • Hatnote templates for category pages
  • Internal category-link templates
  • Interwiki link templates
  • Wikipedia see also
Last edited on 24 March 2019, at 16:40

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 24 March 2019, at 16:40.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop