GameCategory/SortKey – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Template creation)
 
m (Fix Arma 3 not being categorised under Category:Arma 3)
Line 1: Line 1:
<includeonly>{{#if:{{{2|}}}
<includeonly>{{#if:{{{2|}}}
|{{Trim|
|{{#ifeq:{{Trim|{{{2|}}}}}|{{uc:{{{1}}}}}
{{#replace:
|
{{#replace:{{uc:{{{2}}}}}
|{{Trim|
|{{uc:{{{1}}}}}:
{{#replace:
{{#replace:{{uc:{{{2}}}}}
|{{uc:{{{1}}}}}:
|
}}
|{{uc:{{{1}}}}}
|
|
}}
}}
|{{uc:{{{1}}}}}
|
}}
}}
}}
}}

Revision as of 10:12, 27 July 2020

Returns a category sort key for the provided page.

Usage

{{GameCategory/SortKey|categoryName|pageName}}

  • categoryName: the game's full name (e.g Arma 2, not arma2)
  • pageName: the page name from which to get the key, will be uppercased
Examples
Code Result
{{GameCategory/SortKey}}
{{GameCategory/SortKey|Arma 2}}
{{GameCategory/SortKey|Arma 2|Arma 2: Editing}} EDITING
{{GameCategory/SortKey|Arma 3|Arma 3 Editing}} EDITING