Difference between revisions of "Template:Param"

From relax wiki
Jump to navigation Jump to search
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:
{{#ifeq:{{Yesno|{{{nested|no}}}}}|yes||<{{{tag|code}}}>}}&#123;&#123;&#123;{{{1<noinclude>|foo</noinclude>}}}{{#ifeq:{{{2}}}|{{{2|}}} |&#124;}}{{{2|}}}&#125;&#125;&#125;{{#ifeq:{{Yesno|{{{nested|no}}}}}|yes||</{{{tag|code}}}>}}<noinclude>
+
'''<!--                                                Formatting.
{{Documentation}}
+
-->{{#if: {{{1|}}}
<!--
+
    | {{{1}}}<!--                                    The parameter.
  PLEASE ADD CATEGORIES AND INTERWIKIS
+
  -->{{#if: {{{2|}}}
  TO THE /doc SUBPAGE, THANKS
+
      |<nowiki></nowiki> &#61; <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>

Revision as of 18:00, 7 March 2016