Template:Tle/doc: Difference between revisions
More actions
m format |
m expansion |
||
| Line 8: | Line 8: | ||
|2d=name of the template. Will be displayed as linkable item <br><small>When parameter "T" is specified, an additional parameter "t" is ignored</small> | |2d=name of the template. Will be displayed as linkable item <br><small>When parameter "T" is specified, an additional parameter "t" is ignored</small> | ||
|2stat=optional- | |2stat=optional- | ||
|3=1 … | |3=1 … 16 | ||
|3d=parameter value | |3d=parameter value | ||
|3stat=optional- | |3stat=optional- | ||
|4=p1 … | |4=p1 … p16 | ||
|4d=parameter name | |4d=parameter name | ||
|4stat=optional- | |4stat=optional- | ||
| Line 21: | Line 21: | ||
|i18n-desc=The template does not generate any localizable text. | |i18n-desc=The template does not generate any localizable text. | ||
Wikimedia Commons has lots of '''template templates''', but | Wikimedia Commons has lots of '''template templates''', but none can really describe the parametrizing. | ||
|usergroup=all | |usergroup=all | ||
|usage-notes= | |usage-notes= | ||
| Line 27: | Line 27: | ||
}} | }} | ||
== Explanation == | == Explanation == | ||
It is necessary to | It is necessary to distinguish between a template and its parameter names and parameter values, and this meta-template with its meta-parameter-names and meta-parameter-values. | ||
In general, each parameter is described with a meta-pair <code>n= |pn= </code>, an unnamed meta-parameter for the value and (optional) its named meta-parameter p1... | In general, each parameter is described with a meta-pair <code>|n= |pn= </code>, an unnamed meta-parameter for the value and (optional) its named meta-parameter p1...p16 for the name.<br> | ||
For unnamed parameters this name can be the number; if even that is not needed some or all named meta-parameters may dismiss. | For unnamed parameters this name can be the number; if even that is not needed some or all named meta-parameters may dismiss. | ||
Revision as of 07:41, 27 February 2015
Meta template for template description. Describes template parameters
Usage
{{Tle}}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
t | name of the template. Will be displayed as plain text | Tle | optional | |
T | name of the template. Will be displayed as linkable item When parameter "T" is specified, an additional parameter "t" is ignored | empty | optional | |
1 … 16 | parameter value | empty | optional | |
p1 … p16 | parameter name | empty | optional | |
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: all users == Localization ==
The template does not generate any localizable text.
Wikimedia Commons has lots of template templates, but none can really describe the parametrizing.
Explanation
It is necessary to distinguish between a template and its parameter names and parameter values, and this meta-template with its meta-parameter-names and meta-parameter-values.
In general, each parameter is described with a meta-pair |n= |pn= , an unnamed meta-parameter for the value and (optional) its named meta-parameter p1...p16 for the name.
For unnamed parameters this name can be the number; if even that is not needed some or all named meta-parameters may dismiss.
Example
After specifying the template name, its parameter values are specified with the unnamed meta-parameters; its parameter names can be specified with the meta-parameters p1 to pn.
To describe the parameters of template Tle, the following can be used:
{{ Tle | T = template-name | 1 = parm-value1 | 2 = parm-value2 | ... | n = parm-valuen | p1 = parm-name1 | p2 = parm-name2 | ... | pn = parm-namen }}
A template with only unnamed parameters e.g.
{{ Example | 1 = parm-value1 | 2 = parm-value2 | ... | n = parm-valuen }}
or without the numbers
{{ Example | parm-value1 | parm-value2 | ... | parm-valuen }}
{{Commons:Link templates/Template links}}