Template:Custom sort key

From Team Fortress Wiki
Revision as of 06:43, 1 May 2023 by Darkid (talk | contribs) (Created page with "<includeonly>{{#if:{{{1|}}}|{{DEFAULTSORT:{{{1}}}{{{2|}}}}}}}</includeonly><noinclude>{{Doc begin}} Adds a custom sort key for the page which transcludes this te...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Documentation for Custom sort key

Adds a custom sort key for the page which transcludes this template.

Example

{{Custom sort key|{{#switch:{{BASEPAGENAME}}
  | Dirt Road | Gravel Road = Road
}}}}

would result in Dirt Road and Gravel Road being sorted under 'R' (Road).

{{Custom sort key|{{#switch:{{BASEPAGENAME}}
  | Red House | Blue House | Green House = House
}}|, {{BASEPAGENAME}}}}

would result in Red House, Blue House, and Green House being sorted under 'H' (House), but the sort key would also suffix with their full name ("House, Red House") which would ensure that these house pages were still sorted in name order, just adjacently under 'H'.