Template:Param/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<noinclude>{{Doc|0}}</noinclude>
{{Doc/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.
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==
== Parameters ==
* {{Param}} – Parameter name. Displays the number 1 by default.
* {{Param}} – Parameter name. Displays the number 1 by default.
* {{Param|2}} – additional text to be inserted after the parameter name, without a separator. Use {{Code|select=1|&#38;#124;}} for separator.
* {{Param|2}} – additional text to be inserted after the parameter name, without a separator. Use {{Code|select=1|&#38;#124;}} for separator.


==Examples==
== Examples ==
* {{Code|select=1|&#123;&#123;Param&#125;&#125;}} → {{Param}}
* {{Code|select=1|&#123;&#123;Param&#125;&#125;}} → {{Param}}
* {{Code|&#123;&#123;Param&#124;text&#125;&#125;}} → {{Param|text}}
* {{Code|&#123;&#123;Param&#124;text&#125;&#125;}} → {{Param|text}}
* {{Code|&#123;&#123;Param&#124;name&#124;:<lang>&#125;&#125;}} → {{Param|name|:<lang>}}
* {{Code|&#123;&#123;Param&#124;name&#124;:<lang>&#125;&#125;}} → {{Param|name|:<lang>}}
* {{Code|&#123;&#123;Param&#124;2&#61;&#38;#124;text&#125;&#125;}} → {{Param|2=&#124;text}}
* {{Code|&#123;&#123;Param&#124;2&#61;&#38;#124;text&#125;&#125;}} → {{Param|2=&#124;text}}

Revision as of 00:12, 27 April 2023

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

  • {{{1}}} – Parameter name. Displays the number 1 by default.
  • {{{2}}} – additional text to be inserted after the parameter name, without a separator. Use &#124; for separator.

Examples

  • {{Param}}{{{1}}}
  • {{Param|text}}{{{text}}}
  • {{Param|name|:<lang>}}{{{name|:<lang>}}}
  • {{Param|2=&#124;text}}{{{1||text}}}