Code Result

{{Example}}

This is an example of a template. For help with templates, see m:Help:Template.
This is a "message" or "notice" template which returns only this message and takes no parameters.


Template documentationpurge ]

Template example row. This template is used inside tables to demonstrate other templates. The borders here are not part of the template. It's similar to {{Tlrow}} but doesn't include the extra links. It also handles empty parameters slightly different for the first column ("what to type" part) and the second column (result) can be overridden with |example= to do perform the template directly in case it doesn't work correctly.

The following compares {{tlrow}} and {{txrow}} with and without using the |example= parameter. They are demonstrating {{Tlf}} and {{Tle}}, templates where empty parameters are not ignored. Only the last two rows display correctly.

{| class="wikitable"
! Code !! Result
{{tlrow|tlf|example|example_param1||example_param3}}
{{txrow|tlf|example|example_param1||example_param3}}
{{txrow|tle|example|example_param1||example_param3|example={{tle|t=example|example_param1||example_param3}}}}
{{txrow|tlf|example|example_param1||example_param3|example={{tlf|example|example_param1||example_param3}}}}
|}
Gives:
Code Result

{{Tlf|Example|example_param1}}
links talk view

{{example|example_param1||example_param3|||}}


{{Tlf|example|example_param1||example_param3}}

{{example|example_param1||example_param3|||||}}

{{Tle|example|example_param1||example_param3}}

{{ Exampleexample_param1example_param3 }}

{{Tlf|example|example_param1||example_param3}}

{{example|example_param1||example_param3}}


Usage

{{Txrow |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1Template Nameexamplerequired
2Parameter 1emptyoptional
3Parameter 2emptyoptional
4Parameter 3emptyoptional
5Parameter 4emptyoptional
6Parameter 5emptyoptional
7Parameter 6emptyoptional
8Parameter 7emptyoptional
9Parameter 8emptyoptional
10Parameter 9emptyoptional
11Parameter 10emptyoptional
12Parameter 11emptyoptional
13Parameter 12emptyoptional
14Parameter 13emptyoptional
15Parameter 14emptyoptional
style-r<tr> styleemptyoptional
style-l<td> styleemptyoptional
exampleExampleemptyoptional
col3Column 3emptyoptional
eqemptyoptional
Template data
<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

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Template Name1

Default
example
Templaterequired
Parameter 910

Unknownoptional
Parameter 1011

Unknownoptional
Parameter 1112

Unknownoptional
Parameter 1213

Unknownoptional
Parameter 1314

Unknownoptional
Parameter 1415

Unknownoptional
Parameter 12

Unknownoptional
Parameter 23

Unknownoptional
Parameter 34

Unknownoptional
Parameter 45

Unknownoptional
Parameter 56

Unknownoptional
Parameter 67

Unknownoptional
Parameter 78

Unknownoptional
Parameter 89

Unknownoptional
Column 3col3

Contentoptional
eq

Stringoptional
Exampleexample

Contentoptional
<td> stylestyle-l

Stringoptional
<tr> stylestyle-r

Stringoptional

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