Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Tle/doc: Difference between revisions

Template page
m +explanation
m format
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{TemplateBox
{{TemplateBox
|1=t
|1=T
|1d=name of the template. Will be displayed as plain text
|1d=name of the template; Will be displayed as linkable item
|1def=Tle
|1def=<tt>Tle</tt>
|1stat=optional-
|1stat=optional  
|2=T
|2=t
|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 plain text<br><small>When parameter "T" is specified, an additional parameter "t" is ignored</small>
|2stat=optional-
|2stat=optional-
|3=1 … 16
|3=1 … 25
|3d=parameter value; may contain wiki syntax, if necessary
|3d=parameter value; may contain wiki syntax, if necessary
|3stat=optional-
|3stat=optional-
|4=p1&nbsp;…&nbsp;p16
|4=p1&nbsp;…&nbsp;p25
|4d=parameter name
|4d=parameter name
|4stat=optional-
|4stat=optional-
Line 18: Line 18:
|desc=<u>Meta template</u> for template description.
|desc=<u>Meta template</u> for template description.
Describes<!-- and explanes--> template parameters
Describes<!-- and explanes--> template parameters
|namespace=Template talk
|i18n-desc=The template does not generate any localizable text.
|i18n-desc=The template does not generate any localizable text.
 
|namespace=all
Wikimedia Commons has lots of '''template templates''', but none was really able to describe the parametrizing.
|usergroup=all
|usergroup=all
|usage-notes=
|usage-notes=
Line 29: Line 27:
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.  
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>|pn= |n= </code>, an optional meta-parameter p1...p16 for the name and an unnamed meta-parameter for the value.<br>
Wikimedia Commons has lots of other '''template templates''', but none is really able to describe complicated parametrizing easily.  
For unnamed parameters this name can be the number; if even that is not needed some or all named meta-parameters may dismiss.


== Examples ==
In general, each parameter is described with a meta-pair <code>|pn= |n= </code>, an ''optional'' meta-parameter p1...p16 for the name and an ''optional'' unnamed meta-parameter for the value.<br>
For unnamed parameters this name can be the number; if even that is not needed, some or all meta-parameter-names may dismiss.
 
== How to use ==
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 p{{smallsub|n}}.  
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 p{{smallsub|n}}.  
 
To describe the parameters of template <tt>Tle</tt>, the following can be used:<br>
To describe the parameters of template <tt>Tle</tt>, the following can be used:<br>
{{Tle|T=Tle|p1=T|template-name|parm-value1|parm-value2 &#124; ...|parm-value{{Smallsub|n}}|p2=1|p3=2|p4=n
{{Tle|T=Tle|p1=T|template-name|parm-value1|parm-value2 &#124; ...|parm-value{{Smallsub|n}}|p2=1|p3=2|p4=n
|parm-name1|parm-name2 &#124; ...|parm-name{{Smallsub|n}}|p5=p1|p6=p2|p7=p{{Smallsub|n}}}}
|parm-name1|parm-name2 &#124; ...|parm-name{{Smallsub|n}}|p5=p1|p6=p2|p7=p{{Smallsub|n}}}}


A template with only unnamed parameters e.g.<br>
A template with only unnamed parameters may look like e.g.<br>
{{Tle|t=example|p1=1|parm-value1|p2=2|parm-value2 &#124; ...|p3=n|parm-value{{Smallsub|n}}}}
{{Tle|t=example|p1=1|parm-value1|p2=2|parm-value2 &#124; ...|p3=n|parm-value{{Smallsub|n}}}}
   
   
Line 45: Line 45:
{{Tle|t=example|parm-value1|parm-value2 &#124; ...|parm-value{{Smallsub|n}}}}
{{Tle|t=example|parm-value1|parm-value2 &#124; ...|parm-value{{Smallsub|n}}}}


;Example:
Values can as well be empty - even if it is ''not'' a very useful template description to say nothing about a value.
The template {{T|Color}} has two unnamed parameters (1=''color'', 2=''text'') and three named parameters (bg, title and css). With <br>
 
=== Restriction ===
While the values can be specified without names, it makes no sense to specify a name without his value; at least an empty value is necessary.
Superfluous names without values will be ignored:
:<tt><nowiki>{{Tle|t=m||||p3=parameter#3}}</nowiki></tt>  will give {{Tle|t=m||||p3=parameter#3}}
:<tt><nowiki>{{Tle|t=m||||p4=superfluous}}</nowiki></tt>  will give {{Tle|t=m||||p4=superfluous}}
 
== Examples ==
The {{T1|Color|+|case=l}} has two unnamed parameters (1=''color'', 2=''text'') and three named parameters (bg, title and css). With <br>
<code><nowiki>{{Tle|T=color|text color|any text|p3=bg|background color|p4=title|tooltip text|p5=css|CSS attributes}}</nowiki></code><br>
<code><nowiki>{{Tle|T=color|text color|any text|p3=bg|background color|p4=title|tooltip text|p5=css|CSS attributes}}</nowiki></code><br>
this description is made:  {{Tle|T=color|text color|any text|p3=bg|background color|p4=title|tooltip text|p5=css|CSS attributes}}
this description is made:  {{Tle|T=color|text color|any text|p3=bg|background color|p4=title|tooltip text|p5=css|CSS attributes}}


Without any meta-parameter {{Tl|Tle|incl=0}} just shows the template name: {{Tle|T=clr}} or {{Tle|t=clr}}.
<nowiki>{{Tle|t=C| | | | | | | | | }}</nowiki> will just display {{Tle|t=C| | | | | | | | | }}
 
Without any meta-parameter, {{Tl|Tle|incl=0}} just shows the template name: {{Tle|T=clr}} or {{Tle|t=clr}}.<br>
With neither <code>T</code> nor <code>t</code> the default template name will be <tt>Tle</tt>.


{{Commons:Link templates/Template links}}
{{Commons:Link templates/Template links}}

Revision as of 14:27, 7 June 2019

Meta template for template description. Describes template parameters

Usage

{{Tle |T= }}

Template parameters

ParameterDescriptionDefaultStatus
Tname of the template; Will be displayed as linkable itemTleoptional
tname of the template; Will be displayed as plain text
When parameter "T" is specified, an additional parameter "t" is ignored
emptyoptional
1 … 25parameter value; may contain wiki syntax, if necessaryemptyoptional
p1 … p25parameter nameemptyoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users == Localization ==

The template does not generate any localizable text.

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.

Wikimedia Commons has lots of other template templates, but none is really able to describe complicated parametrizing easily.

In general, each parameter is described with a meta-pair |pn= |n= , an optional meta-parameter p1...p16 for the name and an optional unnamed meta-parameter for the value.
For unnamed parameters this name can be the number; if even that is not needed, some or all meta-parameter-names may dismiss.

How to use

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:
{{ TleT = template-name1 = parm-value12 = parm-value2 | ...n = parm-valuenp1 = parm-name1p2 = parm-name2 | ...pn = parm-namen }}

A template with only unnamed parameters may look like e.g.
{{ Example1 = parm-value12 = parm-value2 | ...n = parm-valuen }}

or without the numbers
{{ Exampleparm-value1parm-value2 | ...parm-valuen }}

Values can as well be empty - even if it is not a very useful template description to say nothing about a value.

Restriction

While the values can be specified without names, it makes no sense to specify a name without his value; at least an empty value is necessary. Superfluous names without values will be ignored:

{{Tle|t=m||||p3=parameter#3}} will give {{ Mparameter#3 =  }}
{{Tle|t=m||||p4=superfluous}} will give {{ M }}

Examples

The template:{{Color}} has two unnamed parameters (1=color, 2=text) and three named parameters (bg, title and css). With
{{Tle|T=color|text color|any text|p3=bg|background color|p4=title|tooltip text|p5=css|CSS attributes}}
this description is made: {{ Colortext colorany textbg = background colortitle = tooltip textcss = CSS attributes }}

{{Tle|t=C| | | | | | | | | }} will just display {{ C }}

Without any meta-parameter, {{Tle}} just shows the template name: {{ Clr }} or {{ Clr }}.
With neither T nor t the default template name will be Tle.

{{Commons:Link templates/Template links}}

Cookies help us deliver our services. By using our services, you agree to our use of cookies.