Template:NameSorter

From ChoralWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Documentation

Converts a text in the form "Name(s) Surname" to the form "Surname, Name(s)", removing all diacritics in the process.

Syntax:

  • {{NameSorter}} returns the contents of {{PAGENAME}} after processing it.

Syntax with an optional parameter:

  • {{NameSorter|Antonín Dvořák}} returns "Dvorak, Antonin "


This template is meant to be used as a parameter for the magic word DEFAULTSORT inside Composer and Editor pages, producing an appropriate sort key.

  • {{DEFAULTSORT:{{NameSorter}}}}

In the situations where the normal usage of this template would render an incorrect sort key (as for example "Rue, Pierre de la"), use a textual key instead:

  • {{DEFAULTSORT:La Rue, Pierre de}}

See also