Difference between revisions of "Template:TemplateDataInfo/i18n/en"
(Importing a new version from external source) |
Thcipriani (talk | contribs) m (1 revision imported) |
(No difference)
|
Latest revision as of 17:46, 7 May 2016
<languages/>
|}}{{#switch:{{{incl}}}|1={|2=|{{}}[[:{{#if:|{{{lang}}}:}}Template:{{#if:TemplateBox|TemplateBox|Tl}}|{{#switch:{{{incl}}}|1={|2={{}}{{#if:|{{{2}}}|{{#if:TemplateBox|TemplateBox|Tl}}}}{{#switch:{{{incl}}}|1=}|2=}}}}]]{{#switch:{{{incl}}}|1=}|2=|}}}}{{#if:|
|}}- 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 {{#if:||}}{{#switch:{{{incl}}}|1={|2=|{{}}[[:{{#if:|{{{lang}}}:}}Template:{{#if:TemplateBox|TemplateBox|Tl}}|{{#switch:{{{incl}}}|1={|2={{}}{{#if:|{{{2}}}|{{#if:TemplateBox|TemplateBox|Tl}}}}{{#switch:{{{incl}}}|1=}|2=}}}}]]{{#switch:{{{incl}}}|1=}|2=|}}}}{{#if:|
|}} with either useTemplateData=1
or useTemplateData=only
on the /doc
subpage and transcluding it with {{#if:||}}{{#switch:{{{incl}}}|1={|2=|{{}}[[:{{#if:|{{{lang}}}:}}Template:{{#if:Documentation|Documentation|Tl}}|{{#switch:{{{incl}}}|1={|2={{}}{{#if:|{{{2}}}|{{#if:Documentation|Documentation|Tl}}}}{{#switch:{{{incl}}}|1=}|2=}}}}]]{{#switch:{{{incl}}}|1=}|2=|}}}}{{#if:|
|}} into the template. <nowiki>
-tags can be wrapped around the 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 or the template as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information