Module:SortName/doc: Difference between revisions
From Kenshi Wiki
More actions
Created page with "{{doc sub}} {{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 subst'd for use in template parameters that accept a sortkey or in the <code><nowiki>{{</nowiki>DEFAULTSORT}}</code> variable. *'''No i..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{doc sub}} | {{doc sub}} | ||
{{Lmd|SortName}} | {{Lmd|SortName}} | ||
This module returns a string in a format suitable as a category sortkey, per [[WP:NAMESORT]]. | This module returns a string in a format suitable as a category sortkey, per [[WP:NAMESORT]]. | ||
Line 11: | Line 10: | ||
*'''No input''' (sorts the pages title): <code><nowiki>{{</nowiki>subst:#invoke:SortName|sortname}}</code> | *'''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> | *'''With input''': <code><nowiki>{{</nowiki>subst:#invoke:SortName|sortname|input string}}</code> | ||
<includeonly> | |||
[[Category:Modules]] | |||
</includeonly> | |||
<noinclude> | |||
[[Category:Module documentation pages]] | |||
</noinclude> |
Revision as of 04:23, 26 February 2025
This is a documentation subpage for Module:SortName. It may contain usage information, categories and other content that is not part of the original module page. |
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}}