Difference between revisions of "Template:Param"
Jump to navigation
Jump to search
Bugman admin (talk | contribs) m (1 revision imported: The current Wikipedia Template:key press template.) |
(Template formatting improvements, and enforcement of spacing around the equals sign.) |
||
Line 1: | Line 1: | ||
− | {{# | + | '''<!-- Formatting. |
− | {{ | + | -->{{#if: {{{1|}}} |
− | + | | {{{1}}}<!-- The parameter. | |
− | + | -->{{#if: {{{2|}}} | |
− | + | |<nowiki></nowiki> = <nowiki></nowiki><!-- The equals sign. --> | |
− | + | }} | |
− | </noinclude> | + | }}<!-- |
+ | -->{{{2|}}}<!-- The value. | ||
+ | -->'''<!-- Formatting. | ||
+ | --><noinclude> | ||
+ | |||
+ | {{Informative template|1= | ||
+ | == Goal == | ||
+ | |||
+ | To provide consistent template parameter formatting for template documentation. | ||
+ | |||
+ | == Usage == | ||
+ | |||
+ | {{obr}}param | ||
+ | {{!}} ''parameter'' | ||
+ | {{!}} ''value'' | ||
+ | {{cbr}} | ||
+ | |||
+ | All parameters are optional. | ||
+ | |||
+ | ; {{param|parameter}}: The parameter name. | ||
+ | |||
+ | ; {{param|value}}: The parameter value. | ||
+ | |||
+ | == Example == | ||
+ | {{obr}}param {{!}} type {{cbr}} | ||
+ | {{param | type}} | ||
+ | |||
+ | {{obr}}param {{!}} type {{!}} x {{cbr}} | ||
+ | {{param | type | x}} | ||
+ | |||
+ | {{obr}}param {{!}} {{!}} x {{cbr}} | ||
+ | {{param | | x}} | ||
+ | |||
+ | }}</noinclude> |