Template:Param/doc

From Valve Developer Community
< Template:Param
Revision as of 10:31, 29 April 2023 by Max34 (talk | contribs) (Better documentation.)
Jump to navigation Jump to search
Edit-copy.png
This is a documentation subpage for Template:Param.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

This template is for giving examples of template parameter source code which is useful in template documentation and talk page discussions of template code.

Parameters and Examples

Parameter Description Example Preview
{{{1}}} Parameter name. Displays the number 1 by default, and also if the parameter is empty.

The parameter name is highlighted in white, and also uses the CSS property user-select: all, to quickly copy the parameter name.

{{Param}}
{{Param|}}
{{Param|type}}
{{{1}}}
{{{1}}}
{{{type}}}
{{{2}}} The text to be inserted after the parameter name and the pipe symbol (|). Leave blank to display only the pipe symbol.
{{Param||}}
{{Param|color|}}
{{Param|color|initial}}
{{{1|}}}
{{{color|}}}
{{{color|initial}}}
{{{suf}}} Additional text to be inserted after the parameter name, without any separator. It can be useful if there are parameters with many subtypes.
{{Param|name/|suf=<lang code>}}
{{Param|name/|suf=<lang code>|}}
{{Param|name/|suf=<lang code>|default}}
{{{name/}}}
{{{name/|}}}
{{{name/|default}}}

Other Examples

  • {{Param}}{{{1}}}
  • {{Param|}}{{{1}}}


  • {{Param||}}{{{1|}}}
  • {{Param|2=}}{{{1|}}}


  • {{Param|suf=:part}}{{{1}}}
  • {{Param||suf=:part|}}{{{1|}}}
  • {{Param|suf=:part|2=}}{{{1|}}}


  • {{Param||text}}{{{1|text}}}
  • {{Param|2=text}}{{{1|text}}}
  • {{Param||suf=:part|text}}{{{1|text}}}
  • {{Param|suf=:part|2=text}}{{{1|text}}}


  • {{Param|parameter}}{{{parameter}}}
  • {{Param|parameter|}}{{{parameter|}}}
  • {{Param|parameter|text}}{{{parameter|text}}}
  • {{Param|parameter|suf=:part}}{{{parameter}}}
  • {{Param|parameter|suf=:part|}}{{{parameter|}}}
  • {{Param|parameter|suf=:part|text}}{{{parameter|text}}}


  • {{Param|foo}}{{{foo}}}
  • {{Param|foo|bar}}{{{foo|bar}}}
  • {{Param|foo|{{Param|bar}}}}{{{foo|{{{bar}}}}}}
  • {{Param|foo|{{Param|bar|{{Param|baz|derp}}}}}}{{{foo|{{{bar|{{{baz|derp}}}}}}}}}