Without TemplateData, each parameter needs to be added manually when inserting a new template.
With TemplateData, a list of supported parameters (and their description) is provided for the template.
TemplateData provides context for each parameter, and makes it much easier for users to modify templates.
Anyone can help by adding TemplateData to templates (particularly high-profile ones, such as
infoboxes
) so that they are easier to edit in VisualEditor. The following is a minimal example, placed on a template's documentation page:
<
templatedata
>
{
"description"
:
"insert description here"
,
"params"
:
{
"first parameter"
:
{
"label"
:
"x"
,
"description"
:
"x"
,
"type"
:
"string"
,
"default"
:
"default value"
,
"required"
:
false
}
}
}
<
/templatedata>
You can also add or edit TemplateData using a GUI, by pressing the following button which appears at the top of the edit page:
Manage TemplateData
Here is a list of the most commonly-used templates. When you've added TemplateData to one, add a {{
tick
}} mark next to it; we'll update the list with new additions as we go. It's advisable to do a
null edit
on the main template page to force the system to update the database.
Following are templates which taking parameters but are used <250 times. There are thousands of templates which contain only content for transclusion and which take no parameters. These are not considered here.