Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Defaultsort builder/doc

Template page

This template is called by infoboxes, such as {{Infobox Ross ancestor}}, to generate a properly formatted and standardized `DEFAULTSORT` value for use in MediaWiki pages.

It constructs a default sort key based on:

  • |given_name=
  • |middle_name=
  • |surname=
  • |title_ordinal=
  • |title_role=
  • |title_object=
  • |birth=
  • |death=

Features

Usage

Use in a template with `#invoke` like this:

{{Defaultsort builder
 |given_name=John
 |middle_name=Alexander
 |surname=MacLeod
 |title_ordinal=5th
 |title_role=Chief
 |title_object=Clan MacLeod
 |birth=1543
 |death=1616
}}

Example Output

{{Surname sort standardization switch|MacLeod}}, John Alexander, Clan MacLeod Chief {{Ordinal numbers switch|5th}}

→ Would expand to:

MacLeod, John Alexander, Clan MacLeod Chief 5 1543–1616

See Also