Changes

659 bytes added ,  06:05, 16 July 2021
Pywikibot 6.4.0
{{Lmd|SortName}}

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 [[WP:SUBST|subst'd]] for use in template parameters that accept a sortkey or in the <code><nowiki>{{</nowiki>DEFAULTSORT}}</code> variable.
*'''No input''' (sorts the pages title): <code><nowiki>{{</nowiki>subst:#invoke:SortName|sortname}}</code>
*'''With input''': <code><nowiki>{{</nowiki>subst:#invoke:SortName|sortname|input string}}</code>