Template:Param/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Restore revision 230179 by Deprecated (talk): see revision 301898 of Template:Param)
Line 1: Line 1:
{{Doc/subpage}}
{{Documentation subpage}}
{{Wikipedia port|documentation=1}}
<!-- 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.


== Parameters ==
===Usage===
* {{Param}} – Parameter name. Displays the number 1 by default.
:<code><nowiki>{{param|foo}}</nowiki></code> → {{param|foo}}
* {{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|tag=kbd}}</nowiki></code> &rarr; {{param|foo|tag=kbd}}
:<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 ==
<includeonly>
* {{Code|select=1|&#123;&#123;Param&#125;&#125;}} → {{Param}}
<!-- Categories below this line, please: -->
* {{Code|&#123;&#123;Param&#124;text&#125;&#125;}} → {{Param|text}}
[[Category:Semantic markup templates]]
* {{Code|&#123;&#123;Param&#124;name&#124;:<lang>&#125;&#125;}} → {{Param|name|:<lang>}}
[[Category:Typing-aid templates]]
* {{Code|&#123;&#123;Param&#124;2&#61;&#38;#124;text&#125;&#125;}} → {{Param|2=&#124;text}}
</includeonly>

Revision as of 07:36, 29 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.

Usage

{{param|foo}}{{{foo}}}
{{param|foo|tag=kbd}}{{{foo}}}
{{param|foo|bar}}{{{foo|bar}}}
{{param|foo|{{param|bar|nested=yes}}}}{{{foo|{{{bar}}}}}}
{{param|foo|{{param|bar|{{param|baz|derp|nested=yes}}|nested=yes}}}}{{{foo|{{{bar|{{{baz|derp}}}}}}}}}