Template:Para/doc: Difference between revisions
wikipedia>Sardanaphalus →Examples: when-in-sandbox scope |
wikipedia>Sardanaphalus →Examples: separate when-in-sandbox outputs |
||
Line 13: | Line 13: | ||
| {{tlx|para|name}} | | {{tlx|para|name}} | ||
| | | {{when in sandbox |{{para/sandbox|plain|name}} |{{para|name}} }} | ||
| {{tlx|para|title|<var>book title</var>}} | | {{tlx|para|title|<var>book title</var>}} | ||
| | | {{when in sandbox |{{para/sandbox|plain|title|<var>book title</var>}} |{{para|title|<var>book title</var>}} }} | ||
| {{tlx|para|2=<span style="font-size:1pt;"> </span>|3=section}} | | {{tlx|para|2=<span style="font-size:1pt;"> </span>|3=section}} | ||
| | | {{when in sandbox |{{para/sandbox|plain||section}} |{{para||section}} }}{{pad}}{{95%|(for [[Help:Templates#Parameters|unnamed parameters]]; note empty first parameter in the code)}} | ||
| {{tlx|para|<var>parameter</var>|<var>value</var>}} | | {{tlx|para|<var>parameter</var>|<var>value</var>}} | ||
| | | {{when in sandbox |{{para/sandbox|plain|<var>parameter</var>|<var>value</var>}} |{{para|<var>parameter</var>|<var>value</var>}} }} | ||
}} | }} | ||
When using literal, pre-specified values, simply provide the value (as in the third example above). When illustrating hypothetical, variable or user-definable values, use {{plaincode|<nowiki><var>value</var></nowiki>}} (as in the second example above) and the same should be done for non-literal, example parameters (fourth example above). | When using literal, pre-specified values, simply provide the value (as in the third example above). When illustrating hypothetical, variable or user-definable values, use {{plaincode|<nowiki><var>value</var></nowiki>}} (as in the second example above) and the same should be done for non-literal, example parameters (fourth example above). |
Revision as of 17:11, 28 September 2014
Template:Documentation subpage Template:Distinguish
Usage
This template is for giving examples of template parameter source code (useful in template documentation and talk page discussions of template code). It must have one or two parameters itself. The first is the name of the example parameter to display (this may be empty, but it must be present), and the second (optional) one is a value for the first example parameter, or (if the first {{para}}
parameter is empty) an unnamed example parameter.
Examples
Template:Aligned table When using literal, pre-specified values, simply provide the value (as in the third example above). When illustrating hypothetical, variable or user-definable values, use Template:Plaincode (as in the second example above) and the same should be done for non-literal, example parameters (fourth example above).
See also
- {{Parameter}}