Template:Custom sort key

From Team Fortress Wiki
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'.