From Valve Developer Community
(Redirected from Template:New icon)
Jump to: navigation, search
Tip.pngTip:This template now supports icons with 32px or larger, this meant that users can upload a large icon (128px for example) directly, without having to downscale the icon to 16px, as the MediaWiki software will do this automatically.
With the higher resolution icon available, these will benefits most 4K and Apple Retina display, and won't look blurry. See File:Icon-HL2.png.
It has been suggested that this article or section be merged with {{software external}}. (Discuss)
Blank image.pngTodo: Use backward compatibility in all child templates. The improvement work may not continue soon, but some progress has already been made.
Icon-Bug.pngBug:{{{addtext}}} does not work with all {{{1}}} options. Same is probably the case for {{{addtext-front}}}.
Curly brackets white.pngTemplate Documentation
Page history
This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.
Blank image.pngTodo: Replace the complicated =suf method translations with /strings and {{autolang}} + {{uselangflags}} one instead.

{{Software}} is the template that underlies the icon templates. It has 8 main parameters:

  • {{{1}}} – the way the icon will be displayed.
    • Do not enter this value if you need a regular icon.
    • Enter 1 to get the name of the game with a link to an article about the game.
    • Enter 2 to get the icon and the name of the game after it.
    • Enter 3 to get the same as in the case of the number 1, but with an additional design with colored text.Add -darker after the number to make the background darker to make the text and icon more visible on light background).
    • Enter 4 to get the same as in the case of the number 2, but with an additional design with colored text. Add -darker after the number to make the background darker to make the text and icon more visible on light background).
    • Enter 3.1 or 4.1 will get the same effect as above, but without the shadow behind the text and icon.
    • Enter 3.2 or 4.2 will get the same effect as above, but with different drop shadow effect.
    • Enter "col" (without quotes) to get the color of the game. This is mainly needed for other templates.
    • Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "(also in <game icon>)".
Note.pngNote:however, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!
  • {{{ico}}} – the name of the icon is written here, but only the name itself, without "File:" and square brackets. Recommended name (not required): file:hl2 icon.png for {{hl2}}
  • {{{ico size}}} - width of the icon. Should be 16px for most icons, unless it's double, like Half-Life: Source, in which case it should be 32px, or more. Experimentation may be necessary for non-square icons.
Tip.pngTip:The software icon should be scaled to be in-line with the text size (using {{{ico size}}}). While this is nominally "16 pixels tall", high-DPI displays (particulary such as Apple Retina display, or 4K+ displays) will benefit from the file being higher resolutions; 32 or 64 pixels tall is generally sufficient, although any resolution can be used (MediaWiki will downscale the image automatically and only deliver the necessary resolution).
  • {{{link}}} – link to the article, External links do not work. If not used, the link will use the {{{name}}} parameter.
    Write without the brackets. Underscores and spaces are interchangeable.
Tip.pngTip:For Wikipedia links, prepend "Wikipedia:" to the page name (ex: Wikipedia:Gabe Newell). For external links, use {{software external}} and add {{{is outlink}}}.
  • {{{name}}} – display name.
  • {{{name<number>}}} – this parameter displays an alternate name based on the {{{nt}}} parameter.
Note.pngNote:it is strongly recommended to write the abbreviation of the game in the parameter {{{name0}}}, {{{name1}}}, etc... or {{{nameiPadOS}}} (if supported, in templates such as {{iOS}}.
  • {{{col}}} – the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: #ADD8E6.
    It's highly recommended that you use brighter color for better readability with dark/black pages.
  • {{{addtext}}} – additional text that will be written immediately after the icon. It is mainly needed to add other icons.
Note.pngNote:Make sure to include | addtext = {{{addtext|}}} in the icon templates!
  • {{{nt}}} – this parameter will be used in the {{{name<number>}}} parameter, some may also have {{{name<text>}}}, such as {{iOS}} and {{Mac}}.
Note.pngNote:Make sure that the | nt = {{{nt|}}} part must be included on the icon templates for it to work!

Result & Copy and Paste

In the end, you should get something like this:

{{doc|docpage=Template:Hl2/doc}} <includeonly><onlyinclude>{{Software | {{{1}}} | ico = portal2 icon.png <!-- Icons with higher-resolution (256px or more for example) are now supported. User with low DPI monitor will see 16px, but users with 4K/Apple Retina will see 32px or higher, providing better quality. --> | ico size = 16px <!-- Note: This should always be kept at or near 16px, even with higher-res icon, unless the image is wider. For example, a 1:2 aspect ratio would be 32px. --> | link = Portal 2 | name = {{Autolang|Portal 2|ko=포탈 2|zh=传送门 2|zh-tw=傳送門 2}} <!-- Autolang is now used for translation, which is done automatically by selecting the languages in the language toolbar. Suf-based translation are now deprecated. --> | name0 = portal2 | namePortal 2 = {{Autolang|Portal 2|ko=포탈 2|zh=传送门 2|zh-tw=傳送門 2}} | namemoddir = portal2 | col = #23B1E5 | addtext = {{{addtext|}}} | nt = {{{nt|}}} }}</onlyinclude></includeonly>

You can also copy and paste the code above to create a new icon template.


Translations are handled by the {{In text}} Template.

How To Use

This is how the use of the template in articles will look like:

Code Result
{{portal2}} Portal 2
{{portal2|1}} Portal 2
{{portal2|2}} Portal 2 Portal 2
{{portal2|3}} Portal 2
{{portal2|3-darker}} Portal 2
{{portal2|3.1}} Portal 2
{{portal2|3.2}} Portal 2
{{portal2|4}} Portal 2 Portal 2
{{portal2|4-darker}} Portal 2 Portal 2
{{portal2|4.1}} Portal 2 Portal 2
{{portal2|4.2}} Portal 2 Portal 2
{{portal2|ico}} Icon-Portal2.png
{{portal2|col}} #23B1E5
{{portal2|name}} Portal 2
{{portal2|in}} (in Portal 2)
{{portal2|only}} (only in Portal 2)
{{portal2|since}} (in all games since Portal 2)
{{portal2|not}} (not in Portal 2)
{{portal2|also|addtext=&nbsp;{{csgo}} {{l4d2}}}} (also in Portal 2 Counter-Strike: Global Offensive Left 4 Dead 2)
Aids in the creation of icon templates
Creation date
(04 April 2022)
Revision information
Latest editor
Last edited
Revision size
7643 bytes
7.643 kilobytes
0.007643 megabytes
Technical information
Page identifier
Contains translations
Uses parser functions?
Uses variables?