Template:NameSorter

From ChoralWiki
Jump to: navigation, search
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