Template:T2

From Hârn
Jump to navigation Jump to search

{{T2}}

Template documentation[view] [edit] [history] [purge]
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information



Note: The templates T, T0, T1, T2, Tl contain the same code with the only difference of the default value for the parameter incl=.

Template i appearance
T 2 {{T}}
T0 8 T0
T1 1 {{T1}}
T2 0 {{T2}}
Tl 2 {{Tl}}

This means that each of them can be converted into each one of the others by just replacing that parameter:

T {{T2|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}} {{T2}}
T0 {{T2|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|8}}}}}}|code={{{code|}}}}} T2
T1 {{T2|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|1}}}}}}|code={{{code|}}}}} {{T2}}
T2 {{T2|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|0}}}}}}|code={{{code|}}}}} {{T2}}
Tl <tt>{{T2|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}}</tt> {{T2}}
Tl {{#tag:tt|{{T2|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}}}} {{T2}}

(Because the templates T and Tl are both editprotected currently only T0 and T1 are maintained; the examples below may not work well with other templates.)

Examples

  • {{T2}} → {{T2}}
  • {{T2|coltit}} → {{Coltit}}
  • {{T2|Coltit|incl=0}} → {{Coltit}}
  • {{T2|Coltit|incl=1}} → {{Coltit}}
  • {{T2|Coltit|incl=2}} → {{Coltit}}
  • {{T2|Coltit|incl=4}} → {{Coltit}}
  • {{T2|Coltit|incl=5}} → {{Coltit}}
  • {{T2|Coltit|incl=6}} → {{Coltit}}
  • {{T2|Coltit|incl=8}} → Coltit
  • {{T2|Coltit|incl=9}} → Coltit
  • {{T2|Coltit|coltit}} → {{coltit}}
  • {{T2|Coltit|test|en}} → {{test}}
  • {{T2|Coltit|3=de}} → {{Coltit}}

with code=y

  • {{T2|U|user|code=y|parm=&#124;1=&#124;2=&#124;parameter=}} → {{user|1=|2=|parameter=}}
  • {{T2|coltit|code=y}} → {{Coltit}}
  • {{T2|Coltit|coltit|code=y|excl=y}} → {{coltit}}
  • {{T2|Coltit|color titling|en|code=y}} → {{color titling}}
  • {{T2|Coltit|3=de|code=y}} → {{Coltit}}

{{Commons:Link templates/Template links}}