Template:Param: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
{{SAFESUBST:<noinclude />#ifeq:{{SAFESUBST:<noinclude />Yesno|{{{nested|no}}}}}|yes||<{{{tag|code}}}>}}&#123;&#123;&#123;{{{1<noinclude>|foo</noinclude>}}}{{SAFESUBST:<noinclude />#ifeq:{{{2}}}|{{{2|}}} |&#124;}}{{{2|}}}&#125;&#125;&#125;{{SAFESUBST:<noinclude />#ifeq:{{SAFESUBST:<noinclude />Yesno|{{{nested|no}}}}}|yes||</{{{tag|code}}}>}}<noinclude>
{{Doc}}
{{doc}}
<includeonly><onlyinclude><code style="padding:0">&#123;&#123;&#123;<b style="user-select:all; color:white">{{{1|1}}}</b>{{{2|}}}&#125;&#125;&#125;</code></onlyinclude></includeonly>
<!-- Add categories to the /doc subpage, not here -->
</noinclude>

Revision as of 08:20, 29 April 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

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

Parameters Description Examples 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}}}
{{{}}}
{{{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}}
{{{}}}
{{{color}}}
{{{colorinitial}}}

Other Examples

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


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


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