Template:Software/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Template:Software]] is the template that underlies the icon templates. It has 8 main parameters:
[[Template:Software]] is the template that underlies the icon templates. It has 8 main parameters:
*{{param|1}} - the way the icon will be displayed.
*{{param|1}} the way the icon will be displayed.
** Do not enter this value if you need a regular icon.
** 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 1 to get the name of the game with a link to an article about the game.
Line 9: Line 9:
** Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "(also in <game icon>)".
** Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "(also in <game icon>)".
{{ModernNote|<nowiki>however, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!</nowiki>}}
{{ModernNote|<nowiki>however, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!</nowiki>}}
*{{param|ico}} - the name of the icon is written here, but only the name itself, without "File:" and square brackets.
*{{param|ico}} the name of the icon is written here, but only the name itself, without "File:" and square brackets.
*{{param|link}} - link to the article, external links do not work. If not used, the link will use the {{param|name}} parameter. Write without the "_".
*{{param|link}} link to the article, external links do not work. If not used, the link will use the {{param|name}} parameter. Write without the "_".
*{{param|name}} - display name. Write without the "_".
*{{param|name}} display name. Write without the "_".
*{{param|name<number>}} - this parameter displays an alternate name based on the {{param|nt}} parameter. You can also make a translated version using the {{param|name<number>:<lang_code>}} parameter
*{{param|name<number>}} this parameter displays an alternate name based on the {{param|nt}} parameter. You can also make a translated version using the {{param|name<number>:<lang_code>}} parameter
{{ModernNote|it is strongly recommended to write the abbreviation of the game in the parameter {{param|name0}}}}
{{ModernNote|it is strongly recommended to write the abbreviation of the game in the parameter {{param|name0}}}}
*{{param|col}} - the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: <span style="color:#ADD8E6;font-weight:bold">#ADD8E6</span>.
*{{param|col}} the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: <span style="color:#ADD8E6;font-weight:bold">#ADD8E6</span>.
*{{param|addtext}} - additional text that will be written immediately after the icon. It is mainly needed to add other icons.
*{{param|addtext}} additional text that will be written immediately after the icon. It is mainly needed to add other icons.
{{ModernNote|<nowiki>"addtext={{{addtext|}}}" in the icon templates!</nowiki>}}
{{ModernNote|<nowiki>"addtext={{{addtext|}}}" in the icon templates!</nowiki>}}
*{{param|nt}} - this parameter will be used in the {{param|name<number>}} parameter.
*{{param|nt}} this parameter will be used in the {{param|name<number>}} parameter.


===Result===
===Result===
In the end, you should get something like this ([[Template:Portal2]] was taken as an example):
In the end, you should get something like this:
<pre>&#123;&#123;Documentation|Template:Hl2/doc&#125;&#125;


&lt;onlyinclude>&lt;includeonly>&#123;&#123;Software
{{CodeBlock|src=Template:Portal2|lines=11|<nowiki>{{Documentation|Template:Hl2/doc}}
<includeonly><onlyinclude>{{Software
| {{{1}}}
| {{{1}}}
| ico = Portal2-16px.png
| ico = Portal2-16px.png
| name = {{Autolang|Portal 2|ko=포탈 2|zh=传送门 2|zh-tw=傳送門 2}}
| link = Portal 2
| name = {{autolang|Portal 2|ko=포탈 2|zh=传送门 2|zh-tw=傳送門 2}}
| name0 = portal2
| col = #23B1E5
| col = #23B1E5
| addtext = {{{addtext|}}}
| addtext = {{{addtext|}}}
| nt = {{{nt|}}}
| nt = {{{nt|}}}
&#125;&#125;<nowiki>&lt;/includeonly>&lt;/onlyinclude></nowiki></pre>
}}</onlyinclude></includeonly></nowiki>}}


===How To Use===
===How To Use===
This is how the use of the icon template in articles will look like:
This is how the use of the template in articles will look like:


{{ModernNote|Some of the examples given may lead to non-existent pages.}}
{| class=wikitable
{| class=wikitable
! Code
! Result
|-
|-
| {{tlc|{{lcfirst:portal2}}}}
| {{tlc|{{lcfirst:portal2}}}}

Revision as of 14:07, 14 March 2023

Template: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.
    • Enter 4 to get the same as in the case of the number 2, but with an additional design.
    • 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>)".

Template:ModernNote

  • {{{ico}}} – the name of the icon is written here, but only the name itself, without "File:" and square brackets.
  • {{{link}}} – link to the article, external links do not work. If not used, the link will use the {{{name}}} parameter. Write without the "_".
  • {{{name}}} – display name. Write without the "_".
  • {{{name<number>}}} – this parameter displays an alternate name based on the {{{nt}}} parameter. You can also make a translated version using the {{{name<number>:<lang_code>}}} parameter

Template:ModernNote

  • {{{col}}} – the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: #ADD8E6.
  • {{{addtext}}} – additional text that will be written immediately after the icon. It is mainly needed to add other icons.

Template:ModernNote

  • {{{nt}}} – this parameter will be used in the {{{name<number>}}} parameter.

Result

In the end, you should get something like this:

Template:Portal2
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
{{Documentation|Template:Hl2/doc}} <includeonly><onlyinclude>{{Software | {{{1}}} | ico = Portal2-16px.png | link = Portal 2 | name = {{autolang|Portal 2|ko=포탈 2|zh=传送门 2|zh-tw=傳送門 2}} | name0 = portal2 | col = #23B1E5 | addtext = {{{addtext|}}} | nt = {{{nt|}}} }}</onlyinclude></includeonly>

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|4}} 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={{csgo}} {{l4d2}}}} (also in Portal 2Counter-Strike: Global Offensive Left 4 Dead 2)