Difference between revisions of "Template:NameSorter"

From ChoralWiki
Jump to navigation Jump to search
(+ a counterexample)
m (moved Template:LastName to Template:NameSorter: following a suggestion by Chuck to avoid confusion with the "last name" itself)
(No difference)

Revision as of 13:29, 3 August 2009

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

Syntax:

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

Syntax with an optional parameter:


This template is meant to be used in conjunction with the magic word DEFAULTSORT inside Composer and User pages, delivering to it an appropriate sort key.

  • {{DEFAULTSORT:{{LastName}}}}

In the cases in which the template returns an invalid sort key, as for example "Rue, Pierre de la", use a textual key instead:

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