Template:BD/doc

This template is a shortcut to generate birth and death categories and DEFAULTSORT.

Template:BD/doc

This template is a shortcut to generate birth and death categories and DEFAULTSORT.

This template should be substituted.

Usage

{{BD}} is for quickly generating category tags related to birth and death years, including living people and missing or unknown values. The general DEFAULTSORT can be embedded as well. It should not be used to replace existing DEFAULTSORT and/or category tags.

{{subst:BD|year of birth|year of death|sort key}}

will generate:

{{DEFAULTSORT:sort key}}
[[Category:BIRTH births]]
[[Category:DEATH deaths]]

Other cases are handled with options. The embedded magic word DEFAULTSORT applies to all categories on the page, no matter whether the BD template is before or after them.

This template shoukd be substituted. To substitute it, use the following syntax:

{{subst:BD|year of birth|year of death|sort key}}

Since categories are preferred to be listed in most-common order last, the BD template should generally be placed after the last Category tag, for example:

[[Category:ABC]]
:
[[Category:XYZ]]
{{subst:BD|year of birth|year of death|sort key}}

Options

For each option, the default value is displayed in bold and automatically assumed if the field is left blank.

Please note that MISSING results in Categories that are not displayed on the page.

1 (birth)
2 (death)
3 (sortkey)
  • {{PAGENAME}} : should not be left blank even if it is the same as the page name - only if you don't know what it should be.
  • Asian name, Honorific prefix (qualifier suffix) : for assertion of sortkey assessment.
    "Mao, Zedong" - "Kim, Il-sung" - "Matsuo Bashō|Matsuo, Basho" - "Nu, U" - "Wang, Li (politician)"
  • Family name, Given name, Honorific-prefix (qualifier suffix) : for proper sorting.
    "Newton, Isaac, Sir" - "Karlsson, Ove (sports journalist)"
  • For further details, see Wikipedia:Categorization of people#Ordering names in a category.

Most values are case-insensitive ("LIVING" or "LiVinG" work the same), except when it matters (such as century names).

Examples

For a living person
{{subst:BD|1899||Surname, Name}}

or

{{subst:BD|1899|LIVING|Surname, Name}}

will replace:

{{DEFAULTSORT:Surname, Name}}
[[Category:1899 births]]
[[Category:Living people]]
For a missing birth and living person
{{subst:BD|||Surname, Name}}

or

{{subst:BD|MISSING|LIVING|Surname, Name}}

will replace:

{{DEFAULTSORT:Surname, Name}}
[[Category:Year of birth missing (living people)]]
[[Category:Living people]]
For a dead person
{{subst:BD|1899|1986|Surname, Name}}

will replace:

{{DEFAULTSORT:Surname, Name}}
[[Category:1899 births]]
[[Category:1986 deaths]]
Etc.

Technical

Before changing the template's code or text, please bear in mind:

  • The extra bars in the switch statements are for empty values.
  • Extra whitespace around years doesn't matter, because page titles are not sensitive to extra spaces.

The template provides a local sandbox and testcases for developing and testing changes (see documentation's hat-note).


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.