Template:Param/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Updated docs with Para usage)
mNo edit summary
Line 1: Line 1:
{{Documentation subpage}}
<noinclude>{{Doc|0}}</noinclude>
{{Wikipedia port|documentation=1}}
{{Distinguish|Template:Para}}
<!-- Categories go at the bottom of this page. -->
 
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.


===Usage===
==Parameters==
:<code><nowiki>{{param|foo}}</nowiki></code> → {{param|foo}}
* {{Param}} – Parameter name. Displays the number 1 by default.
:<code><nowiki>{{param|foo|tag=kbd}}</nowiki></code> &rarr; {{param|foo|tag=kbd}}
* {{Param|2}} – additional text to be inserted after the parameter name, without a separator. Use {{Code|select=1|&#38;#124;}} for separator.
:<code><nowiki>{{param|foo|bar}}</nowiki></code> → {{param|foo|bar}}
:<code><nowiki>{{param|foo|{{param|bar|nested=yes}}}}</nowiki></code> → {{param|foo|{{param|bar|nested=yes}}}}
:<code><nowiki>{{param|foo|{{param|bar|{{param|baz|derp|nested=yes}}|nested=yes}}}}</nowiki></code> → {{param|foo|{{param|bar|{{param|baz|derp|nested=yes}}|nested=yes}}}}
 
====Examples involving {{tl|para}}====
:<code><nowiki>{{para|foo|{{param|bar}}}}</nowiki></code> → {{para|foo|{{param|bar}}}}
:<code><nowiki>{{para|foo|{{param|bar|nested=yes}}}}</nowiki></code> → {{para|foo|{{param|bar|nested=yes}}}}
:<code><nowiki>{{para|foo}}{{param|bar}}</nowiki></code> → {{para|foo}}{{param|bar}}
:<code><nowiki>{{para|foo|{{var|bar}}}}</nowiki></code> → {{para|foo|{{var|bar}}}}
 
===See also===
* {{tl|para}}


<includeonly>
==Examples==
<!-- Categories below this line, please: -->
* {{Code|select=1|&#123;&#123;Param&#125;&#125;}} → {{Param}}
[[Category:Semantic markup templates]]
* {{Code|&#123;&#123;Param&#124;text&#125;&#125;}} → {{Param|text}}
[[Category:Typing-aid templates]]
* {{Code|&#123;&#123;Param&#124;name&#124;:<lang>&#125;&#125;}} → {{Param|name|:<lang>}}
</includeonly>
* {{Code|&#123;&#123;Param&#124;2&#61;&#38;#124;text&#125;&#125;}} → {{Param|2=&#124;text}}

Revision as of 15:31, 31 January 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)
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}}}