Difference between revisions of "Template:Game name"

From Valve Developer Community
Jump to: navigation, search
m (Comment about renaming this page (something I cannot do))
(Updated to include links to each game page on the title text (instead of just on the icon))
Line 125: Line 125:
 
| synergy = {{synergy}}
 
| synergy = {{synergy}}
 
| #default = ?
 
| #default = ?
}} {{#switch: {{{1}}}
+
}} [[{{#switch: {{{1}}}
 +
| {{src06}}
 +
| src06 = Source_2006
 +
| {{src07}}
 +
| src07 = Source_2007
 +
| {{src09}}
 +
| src09 = Source_2009
 +
| {{src13}}
 +
| src13 = Source_2013
 +
| {{src13mp}}
 +
| src13mp = Source_2013
 +
| {{hl1}}
 +
| hl1 = Half-Life
 +
| {{HLS}}
 +
| HLS
 +
| hls = Half-Life:_Source
 +
| {{hl2}}
 +
| hl2 = Half-Life_2
 +
| {{ep1}}
 +
| ep1 = Half-Life_2:_Episode_One
 +
| {{ep2}}
 +
| ep2 = Half-Life_2:_Episode_Two
 +
| {{tf2}}
 +
| tf2 = Team_Fortress_2
 +
| {{l4d}}
 +
| l4d = Left_4_Dead
 +
| {{l4d2}}
 +
| l4d2 = Left_4_Dead_2
 +
| {{as}}
 +
| as = Alien_Swarm
 +
| {{asrd}}
 +
| asrd = Alien_Swarm:_Reactive_Drop
 +
| {{portal}}
 +
| portal = Portal
 +
| {{portal2}}
 +
| portal2 = Portal_2
 +
| {{P2CE}}
 +
| P2CE = Portal_2:_Community_Edition
 +
| {{sin}}
 +
| sin = SiN_Episodes
 +
| {{bms}}
 +
| bms
 +
| Black Mesa (Source) = Black_Mesa_(Source)
 +
| {{GMOD}}
 +
| GMOD
 +
| gmod = Garry's_Mod
 +
| {{insurgency}}
 +
| insurgency = Insurgency
 +
| {{con}}
 +
| con = Contagion
 +
| {{csgo}}
 +
| csgo = Counter-Strike:_Global_Offensive
 +
| {{mapbase}}
 +
| mapbase = Mapbase
 +
| {{ez1}}
 +
| ez1 = Entropy_:_Zero
 +
| {{ez2}}
 +
| ez2 = Entropy_:_Zero_2
 +
| {{synergy}}
 +
| synergy = Synergy
 +
| #default = ?
 +
}}|<span style="color:{{Game color|{{#switch: {{{1}}}
 +
| {{src06}}
 +
| src06 = {{src06}}
 +
| {{src07}}
 +
| src07 = {{src07}}
 +
| {{src09}}
 +
| src09 = {{src09}}
 +
| {{src13}}
 +
| src13 = {{src13}}
 +
| {{src13mp}}
 +
| src13mp = {{src13mp}}
 +
| {{hl1}}
 +
| hl1 = {{hl1}}
 +
| {{HLS}}
 +
| HLS
 +
| hls = {{HLS}}
 +
| {{hl2}}
 +
| hl2 = {{hl2}}
 +
| {{ep1}}
 +
| ep1 = {{ep1}}
 +
| {{ep2}}
 +
| ep2 = {{ep2}}
 +
| {{hl2episodes}}
 +
| hl2episodes = {{hl2episodes}}
 +
| {{tf2}}
 +
| tf2 = {{tf2}}
 +
| {{l4d}}
 +
| l4d = {{l4d}}
 +
| {{l4d2}}
 +
| l4d2 = {{l4d2}}
 +
| {{as}}
 +
| as = {{as}}
 +
| {{asrd}}
 +
| asrd = {{asrd}}
 +
| {{portal}}
 +
| portal = {{portal}}
 +
| {{portal2}}
 +
| portal2 = {{portal2}}
 +
| {{P2CE}}
 +
| P2CE = {{P2CE}}
 +
| {{sin}}
 +
| sin = {{sin}}
 +
| {{bms}}
 +
| bms
 +
| Black Mesa (Source) = {{bms}}
 +
| {{GMOD}}
 +
| GMOD
 +
| gmod = {{GMOD}}
 +
| {{insurgency}}
 +
| insurgency = {{insurgency}}
 +
| {{con}}
 +
| con = {{con}}
 +
| {{csgo}}
 +
| csgo = {{csgo}}
 +
| {{mapbase}}
 +
| mapbase = {{mapbase}}
 +
| {{ez1}}
 +
| ez1 = {{ez1}}
 +
| {{ez2}}
 +
| ez2 = {{ez2}}
 +
| {{synergy}}
 +
| synergy = {{synergy}}
 +
| #default = ?
 +
}}}};font-weight:bold;">{{#switch: {{{1}}}
 
| {{src06}}
 
| {{src06}}
 
| src06 = Source 2006
 
| src06 = Source 2006
Line 188: Line 312:
 
| synergy = Synergy
 
| synergy = Synergy
 
| #default = ???
 
| #default = ???
}}</span><noinclude>
+
}}</span>]]</span><noinclude>
 
{{documentation}}
 
{{documentation}}
 
<!-- Add categories to the /doc subpage, not here -->
 
<!-- Add categories to the /doc subpage, not here -->
  
 
<!-- Please excuse the ugliness of this template. -->
 
<!-- Please excuse the ugliness of this template. -->
<!-- Unfortunately, this wiki does not have the mediawiki variables extension, so we have to copypasta the large switch blocks if they are needed more than once. :( -->
+
<!-- Unfortunately, this wiki does not have the mediawiki variables extension, so we have to copypasta the large switch blocks if they are needed more than once. >:( -->
  
<!-- I created with the name "GameName" but perhaps "Game name" would be better, considering the existence of "Game color" and that naming convention. Unfortunately, I cannot rename the page... perhaps someone else can do this for me. -->
+
<!-- I created this template with the name "GameName" but perhaps "Game name" would be more consistent with this Wiki's naming convention (considering the existence of "Game color"). Unfortunately, I do not have permission to rename this template... perhaps someone else can do this for me. -->
 
</noinclude>
 
</noinclude>

Revision as of 13:42, 18 June 2021

? ???

Template icon Template documentation[view] [edit] [history] [purge]

An inline template that displays a game's icon and name with colored text and the subtle background from the add, only, and also templates. Intended for situations where the full game name is better than just its icon (such as in the middle of a sentence), and the reader's focus should be drawn to the presence of the game in whatever idea is being communicated.

Usage

This template has four parameters:

  • The first parameter has no name. The parameter should be the transclusion of exactly one template from Category:Game icons without the {{}} double braces.
  • name - this parameter is required for the name of the game. The name of the game must necessarily coincide with the title of the article of the game itself to which you are linking. Do not write the suffix there, for this there is a third parameter.
Note.png Note: It is clear that it is inconvenient to constantly write down the name parameter with the full name of the game, but on the other hand, in this case "switch" is not used, which means that if a new game or mod appears, it will be enough just to add its icon as a template and then this game/mod will work fine with this template.
  • suf - this parameter is needed so that the icon and the name of the game lead to the page of the language you need. Be sure to write ":es" but not "es"
  • gl - this parameter will make this template look like the "Game link" template.

Examples

{{Game name|hl2|name=Half-Life 2}}Half-Life 2 Half-Life 2
{{Game name|src07|name=Source 2007}}<Source><Source> Source 2007
{{Game name|GMOD|name=Garry's Mod}}Garry's Mod Garry's Mod
{{Game name|portal2|suf=:ru|name=Portal 2}}Portal 2 Portal 2
{{Game name|hl2|gl=1|name=Half-Life 2}}Half-Life 2 Half-Life 2

See Also