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

Module:Defaultsort builder/doc

From Ross Surname Project

This is the documentation page for Module:Defaultsort builder

This module generates 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=

Features

Usage

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

{{#invoke:Defaultsort builder|buildDefaultSort
 |given_name=John
 |middle_name=Alexander
 |surname=MacLeod
 |title_ordinal=5th
 |title_role=Chief
 |title_object=Clan MacLeod
}}

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

See Also

Acknowledgements

This module includes code generated by ChatGPT.