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

Template:Category see also if exists 2

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 84,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.

Displays a "see also" link to a category, if it exists. Otherwise, it will optionally display a "see also" link to a second category, if that exists. Similarly with the third and fourth parameters.

If none of the categories exists, it does nothing.

Contents

  • 1 Purpose
  • 2 Usage
  • 3 Redirects
  • 4 See also

Purpose

This template is a variant of {{Category see also if exists}}, with added provision for a fallback category if the first one does not exist.

It allows the creation of a link to a category which may 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 the target category is likely to exist any time soon. The link can be created now, rather than having to edit the page again later.

This template can be used in other templates such as {{estcat}}, or directly on category pages or articles.

Usage

Usual syntax
{{Category see also if exists 2|category name|second category name}}

Parameters:

  1. category name
  2. optional second (fallback) category name. If the first category does not exist, the second will be tested in the same way, and linked only if it exists.
Examples
  1. A category which does exist:
    {{Category see also if exists 2|1915 disestablishments in South West Africa}} →
  2. A non-existent category:
    {{Category see also if exists 2|1919 disestablishments in South West Africa}} →

  3. A non-existent category with a fallback category that does exist:
    {{Category see also if exists 2|1919 disestablishments in South West Africa|1910s disestablishments in South West Africa}} →
  4. A non-existent category with a fallback category that also does not exist:
    {{Category see also if exists 2|1955 disestablishments in South West Africa|1950s disestablishments in South West Africa}} →

The outcomes of the above examples 1, 3 and 4 are displayed at Category:1915 establishments in South West Africa, Category:1919 establishments in South West Africa and Category:1955 establishments in South West Africa.

Extended syntax
{{Category see also if exists 2|category name|second category name|third category name|fourth category name}}

The optional third and fourth parameters are tested in turn to see if they exist if neither the first nor second parameters exist.

Redirects

  • {{Cat see also if exists 2}}

See also

  • {{Category see also if exists}}
  • {{Category see also}}
  • {{Link if exists}}
  • {{Navseasoncats}} – for navigation between categories with years, decades, ordinals, or seasons in their name
  • {{if empty}}
  • 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 2/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://moasspedia.org/w/index.php?title=Template:Category_see_also_if_exists_2&oldid=7411"
Categories:
  • Exclude in print
  • Conditional link templates
  • Hatnote templates for category pages
  • Internal category-link templates
  • Interwiki link templates
  • Wikipedia see also
Last edited on 30 April 2021, at 14:47

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 30 April 2021, at 14:47.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop