Template:GameCategory

From Bohemia Interactive Community
Jump to navigation Jump to search

Adds a game (sub-)category to the proper format and finds the page Category Sort key (e.g Arma 2: Editing gets sorted as EDITING).
Uses {{Name}} and {{GameCategory/SortKey}}.

Usage

{{GameCategory|game|subCategory|link=|sortKey=}}

  • game: game id, see {{Name}}
  • subCategory: (Optional, default empty) sub-category (e.g Editing)
  • link: (Optional, default empty - named argument) y to make it a link to the category
  • sortKey: (Optional, default {{uc:{{PAGENAME}}}} - named argument) category sort key - will be uppercased
Examples
Code Result
{{GameCategory}} N/A
{{GameCategory|ofpr}} [[Category: {{Name|ofpr|cat}}|SORTKEY]]
End result: [[Category: Operation Flashpoint: Resistance|SORTKEY]]
{{GameCategory|arma1}} [[Category: {{Name|arma1|cat}}|SORTKEY]]
End result: [[Category: ArmA: Armed Assault|SORTKEY]]
{{GameCategory|arma1qg}} [[Category: {{Name|arma1qg|cat}}|SORTKEY]]
End result: [[Category: ArmA: Queen's Gambit|SORTKEY]]
{{GameCategory|arma3|Editing}} [[Category: {{Name|arma3|cat}}: Editing|SORTKEY]]
End result: [[Category: Arma 3: Editing|SORTKEY]]
{{GameCategory|arma3|link=y}} [[:Category: {{Name|arma3|cat}}|SORTKEY]]
End result: [[:Category: Arma 3|SORTKEY]]
Arma 3
{{GameCategory|arma3|Editing|link=y}} [[:Category: {{Name|arma3|cat}}: Editing|SORTKEY]]
End result: [[:Category: Arma 3: Editing|SORTKEY]]
Arma 3: Editing
{{GameCategory|arma3|Editing|sortKey=#}} [[Category: {{Name|arma3|cat}}: Editing|#]]
End result: [[Category: Arma 3: Editing|#]]