Help:TemplateData

As explained here, TemplateData is a way of storing information about a template - such as parameter names, or a description of the template - so that the VisualEditor can retrieve it and populate the template editor with it. TemplateData is controlled by a MediaWiki extension, which allows users to write small bits of structured data to a template page, or to be transcluded into that template page. Once a template has this structured data, it can be displayed properly in the VisualEditor. While this may sound complex, it's actually very easy.

How to use TemplateData
TemplateData's structure is based around the "JSON" standard, and is fairly simple. The first thing to do is to type out a pair of tags, like so:

TemplateData goes here

This tells the software that everything between the two tags is TemplateData, and should be referenced when the template is used. The TemplateData itself follows a standard layout; let's say that you have a template called "Commons" for linking to a commons category about an article. It has one parameter, and that is the name of the commons category. The TemplateData would look something like:

{       "description": "A template for linking to a commons category about an article", "params": { "1": {                       "label": "Commons category", "type": "string", "required": true, "description": "The commons category you want to link to.", "aliases": ["1"] } } This would display, in the template, like so: {       "description": "A template for linking to a commons category about an article", "params": { "1": {                       "label": "Commons category", "type": "string", "required": true, "description": "The commons category you want to link to.", "aliases": ["1"] }       } }