GameCategory/SortKey – Template
| Lou Montana (talk | contribs) m (Fix Arma 3 not being categorised under Category:Arma 3) | Lou Montana (talk | contribs)  m (Text replacement - "<tt>([^ =]+)<\/tt>" to "{{hl|$1}}") | ||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| <includeonly>{{#if:{{{2|}}} | <includeonly>{{#if:{{{2|}}} | ||
| 	|{{#ifeq:{{Trim|{{{2|}}}}}|{{uc:{{{1}}}}} | 	|{{#ifeq:{{Trim|{{uc:{{{2|}}}}}}}|{{uc:{{{1}}}}} | ||
| 		| | 		|{{uc:{{{1}}}}} | ||
| 		|{{Trim| | 		|{{Trim| | ||
| 			{{#replace: | 			{{#replace: | ||
| Line 14: | Line 14: | ||
| 	}} | 	}} | ||
| }}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
| Returns  | Returns an uppercase category sort key for the provided page. | ||
| == Usage == | == Usage == | ||
| {{<nowiki/>GameCategory/SortKey|'''''categoryName'''''|'''''pageName'''''}} | {{<nowiki/>GameCategory/SortKey|'''''categoryName'''''|'''''pageName'''''}} | ||
| * categoryName: the game's  | * categoryName: the game's ''category'' name (see {{Template|Name}} - e.g {{hl|Arma 2}}, '''not''' {{hl|arma2}}) | ||
| * pageName: the page name from which  | * pageName: the page name from which the key is taken | ||
| {| class="wikitable" | {| class="wikitable" | ||
| Line 31: | Line 31: | ||
| | <nowiki>{{GameCategory/SortKey|Arma 2}}</nowiki> | | <nowiki>{{GameCategory/SortKey|Arma 2}}</nowiki> | ||
| | {{GameCategory/SortKey|Arma 2}} | | {{GameCategory/SortKey|Arma 2}} | ||
| |- | |||
| | <nowiki>{{GameCategory/SortKey|Arma 2|Arma 2}}</nowiki> | |||
| | {{GameCategory/SortKey|Arma 2|Arma 2}} | |||
| |- | |- | ||
| | <nowiki>{{GameCategory/SortKey|Arma 2|Arma 2: Editing}}</nowiki> | | <nowiki>{{GameCategory/SortKey|Arma 2|Arma 2: Editing}}</nowiki> | ||
| Line 39: | Line 42: | ||
| |} | |} | ||
| [[Category:Templates]]</noinclude> | [[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude> | ||
Latest revision as of 10:33, 16 November 2021
Returns an uppercase category sort key for the provided page.
Usage
{{GameCategory/SortKey|categoryName|pageName}}
- categoryName: the game's category name (see {{Name}} - e.g Arma 2, not arma2)
- pageName: the page name from which the key is taken
| Code | Result | 
|---|---|
| {{GameCategory/SortKey}} | |
| {{GameCategory/SortKey|Arma 2}} | |
| {{GameCategory/SortKey|Arma 2|Arma 2}} | ARMA 2 | 
| {{GameCategory/SortKey|Arma 2|Arma 2: Editing}} | EDITING | 
| {{GameCategory/SortKey|Arma 3|Arma 3 Editing}} | EDITING | 
