Template:Advanced link

From Valve Developer Community
Revision as of 10:33, 8 October 2025 by Max34 (talk | contribs) (Max34 moved page Template:Software inline to Template:Advanced link: Now the template is meant as an advanced link rather than a link to some program)
Jump to navigation Jump to search
Todo: Come up with a better name for this template.

This template is an improved and simplified version of template {{Software}}.

Child Templates Usage

These examples are written directly using this template, since the {{Portal 2}}, {{Idtech3}} and {{Cs2d}} do not currently use this template as their base.

Description

Parameter Description
| {{{show|}}} The first parameter specifies the template display format:
  • If the value is empty, the standard option will be displayed: an icon with a link.
  • icon – Displays only the icon.
  • link – Displays only the link.
  • text – Displays link text only.
  • styled – Displays an icon and bold link colored in the color specified by the {{{color}}} parameter.

When used in child templates, you must specify it as {{{show|}}} (or {{{1|{{{show|}}}}}} if the child template does not use unnamed parameters for anything else) so that you can change the modes when using them.

| color = <color> Used to colorize a link in styled mode. Default value is #3C78D2.
| icon = Example.png The icon that will be displayed next to the link. You only need to specify the file name and format, do not enter File: at the beginning.
| icon size = 32 Icon size. Don't include px at the end when specifying a parameter. Default value is x16px.
| external = If this parameter is specified, the value of the {{{link}}} parameter will be treated as an external link. Do not enter anything into this parameter, it must be left blank, otherwise it will break the template.
| link = Half-Life 2 Link. If the {{{external}}} parameter is specified, this link will be treated as external link.
| name = Portal 2 The text that will be displayed for the link.

Example

Template:Portal 2 (not the actual one)
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
{{Software inline | {{{1|}}} | color = #23B1E5 | icon = Portal2 icon.png | link = {{Langprefix}}Portal 2 | name = {{#switch:{{Language}}|#default=Portal 2|Ko=포탈 2}} }}