Jump to content

Module:SortName/doc

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Pppery (talk | contribs) at 22:36, 13 February 2020. The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Module:SortName (edit | talk | history | links | watch | logs)

This module returns a string in a format suitable as a category sortkey, per WP:NAMESORT.

Input

The module accepts a string as the first and only unnamed parameter, but is meant to be used with no parameter, in which case the title of the calling page is used.

Usage

This module should be subst'd for use in template parameters that accept a sortkey or in the {{DEFAULTSORT}} variable.

  • No input (sorts the pages title): {{subst:#invoke:SortName|sortname}}
  • With input: {{subst:#invoke:SortName|sortname|input string}}