GameCategory/SortKey – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add example)
m (Add category details)
(2 intermediate revisions by 2 users not shown)
Line 14: Line 14:
}}
}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
Returns a category sort key for the provided page.
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 full name (e.g <tt>Arma 2</tt>, '''not''' <tt>arma2</tt>)
* categoryName: the game's ''category'' name (see {{Template|Name}} - e.g <tt>Arma 2</tt>, '''not''' <tt>arma2</tt>)
* pageName: the page name from which to get the key, will be uppercased
* pageName: the page name from which the key is taken


{| class="wikitable"
{| class="wikitable"
Line 32: Line 32:
| {{GameCategory/SortKey|Arma 2}}
| {{GameCategory/SortKey|Arma 2}}
|-
|-
| <nowiki>{{GameCategory/SortKey|Arma 2}}</nowiki>
| <nowiki>{{GameCategory/SortKey|Arma 2|Arma 2}}</nowiki>
| {{GameCategory/SortKey|Arma 2|Arma 2}}
| {{GameCategory/SortKey|Arma 2|Arma 2}}
|-
|-
Line 42: Line 42:
|}
|}


[[Category:Templates]]</noinclude>
[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>

Revision as of 21:30, 27 December 2020

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
Examples
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