<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nl">
	<id>https://wiki.hisgis.nl/index.php?action=history&amp;feed=atom&amp;title=Extension%3ATemplateData</id>
	<title>Extension:TemplateData - Bewerkingsoverzicht</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hisgis.nl/index.php?action=history&amp;feed=atom&amp;title=Extension%3ATemplateData"/>
	<link rel="alternate" type="text/html" href="https://wiki.hisgis.nl/index.php?title=Extension:TemplateData&amp;action=history"/>
	<updated>2026-05-28T21:10:03Z</updated>
	<subtitle>Bewerkingsoverzicht voor deze pagina op de wiki</subtitle>
	<generator>MediaWiki 1.38.7</generator>
	<entry>
		<id>https://wiki.hisgis.nl/index.php?title=Extension:TemplateData&amp;diff=1519&amp;oldid=prev</id>
		<title>Thomas: 1 versie geïmporteerd</title>
		<link rel="alternate" type="text/html" href="https://wiki.hisgis.nl/index.php?title=Extension:TemplateData&amp;diff=1519&amp;oldid=prev"/>
		<updated>2019-09-25T12:46:14Z</updated>

		<summary type="html">&lt;p&gt;1 versie geïmporteerd&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;nl&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Oudere versie&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versie van 25 sep 2019 14:46&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;nl&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(geen verschil)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Thomas</name></author>
	</entry>
	<entry>
		<id>https://wiki.hisgis.nl/index.php?title=Extension:TemplateData&amp;diff=1518&amp;oldid=prev</id>
		<title>interwiki&gt;Hildeoc: /* Param object */</title>
		<link rel="alternate" type="text/html" href="https://wiki.hisgis.nl/index.php?title=Extension:TemplateData&amp;diff=1518&amp;oldid=prev"/>
		<updated>2019-09-24T15:42:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Param object&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nieuwe pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
{{Extension&lt;br /&gt;
|name = TemplateData&lt;br /&gt;
|status = stable&lt;br /&gt;
|image = Screenshot of TemplateData extension.png&lt;br /&gt;
|type1 = tag&lt;br /&gt;
|type2 = api&lt;br /&gt;
|author = [[User:Krinkle|Timo Tijhof]], [[User:Mooeypoo|Moriel Schottlender]], [[User:Jdforrester (WMF)|James Forrester]], [[User:Trevor Parscal|Trevor Pascal]], [[User:Matma Rex|Bartosz Dziewoński]], Marielle Volz, ...&lt;br /&gt;
|description = &amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt; Allows to store, retrieve and visualise information about templates&amp;lt;/translate&amp;gt;&lt;br /&gt;
|license = GPL-2.0&lt;br /&gt;
|update = &amp;lt;translate&amp;gt;&amp;lt;!--T:2--&amp;gt; Continuous updates&amp;lt;/translate&amp;gt;&lt;br /&gt;
|mediawiki = 1.25+. &amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; TemplateData master is only supported with core's master; otherwise, use matching branches (e.g. TemplateData REL1_26 with core REL1_26, or matching WMF release branches).&amp;lt;/translate&amp;gt;&lt;br /&gt;
|php = 5.4+&lt;br /&gt;
|hook1 = ParserFirstCallInit&lt;br /&gt;
|hook2 = PageContentSave&lt;br /&gt;
|hook3 = ResourceLoaderTestModules &lt;br /&gt;
|hook4 = ResourceLoaderRegisterModules&lt;br /&gt;
|hook5 = EditPage::showEditForm:initial&lt;br /&gt;
|download = {{WikimediaDownload|TemplateData}}&lt;br /&gt;
|needs-updatephp = No&lt;br /&gt;
|readme =&lt;br /&gt;
|parameters = $wgTemplateDataUseGUI&lt;br /&gt;
|phabricator = TemplateData&lt;br /&gt;
|tags = {{tag|templatedata|open}}&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
The '''TemplateData''' extension introduces a &amp;lt;tvar|1&amp;gt;{{tag|templatedata|open}}&amp;lt;/&amp;gt; tag and an API which together allow editors to specify how templates should be invoked.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
This information is available as a nicely-formatted table for end-users, and as a JSON API, which enables other systems (e.g. [[VisualEditor]]) to build interfaces for working with templates and their parameters.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
See {{&amp;lt;tvar|1&amp;gt;ll|Help:TemplateData#Custom formats&amp;lt;/&amp;gt;|Help:TemplateData#Custom formats}} for in-depth help.&lt;br /&gt;
&lt;br /&gt;
== Installation == &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{ExtensionInstall&lt;br /&gt;
|registration=yes&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Editing data == &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
The TemplateData extension works through having a &amp;lt;tvar|1&amp;gt;{{tag|templatedata|open}}&amp;lt;/&amp;gt; tag defined in the wikitext of a template page (optionally it can be transcluded from a different page as well).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
This is designed to be compatible with the common layout many wikis have of transcluding template documentation from a separate page (but is not required).&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
This content of the &amp;lt;tvar|1&amp;gt;{{tag|templatedata|open}}&amp;lt;/&amp;gt; tag must be valid JSON using the format described below; note that '''all descriptions must be in plain text''' (no wikitext is accepted inside the template data).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
When a &amp;lt;tvar|1&amp;gt;{{tag|templatedata|open}}&amp;lt;/&amp;gt; block is included on a page, the TemplateData extension performs the following checks when the page is being saved:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
# The contents must be valid JSON;&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
# Each item within the JSON structure must be of the expected type as specified below (e.g. object, array, or a primitive); and&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
# For those items which have a specified list of possible values (e.g. &amp;lt;tvar|1&amp;gt;&amp;lt;code&amp;gt;params.yourParameterName.type&amp;lt;/code&amp;gt;&amp;lt;/&amp;gt;), the value in the JSON object must match one of those values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
If any of these checks fails, the server will not be permitted saving and an error message will be displayed above the edit page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
For autovalue items, [[&amp;lt;tvar|1&amp;gt;bugzilla:2700&amp;lt;/&amp;gt;|bug 2700]] prevents &amp;lt;tvar|2&amp;gt;&amp;lt;code&amp;gt;subst:&amp;lt;/code&amp;gt;&amp;lt;/&amp;gt; from working in any template that is added inside a &amp;lt;tvar|3&amp;gt;{{tag|tag|open}}&amp;lt;/&amp;gt;, including &amp;lt;tvar|4&amp;gt;{{tag|ref|open}}&amp;lt;/&amp;gt; and &amp;lt;tvar|5&amp;gt;{{tag|gallery|open}}&amp;lt;/&amp;gt; tags.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
The TemplateData block will save correctly, but the resulting wikitext will not be parsed correctly when the template is used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
Note that  you cannot use &amp;lt;tvar|1&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#tag:templatedata}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/&amp;gt; in lieu of &amp;lt;tvar|2&amp;gt;{{tag|templatedata|open}}&amp;lt;/&amp;gt;.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
&lt;br /&gt;
The below is a visualised version of the JSON data as defined on the template page enclosed by &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;templatedata&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/templatedata&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags. The formal specification is available in the TemplateData repository. Refer to [https://github.com/wikimedia/mediawiki-extensions-TemplateData/blob/master/Specification.md Specification.md] for the latest version.&lt;br /&gt;
&lt;br /&gt;
====TemplateData object====&lt;br /&gt;
The TemplateData object is a ''JSON root element'' enclosed in a &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;templatedata&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; element on the template page.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;TemplateData Object&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#InterfaceText (string or object)|InterfaceText]] or &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;&lt;br /&gt;
| A brief description of the template. '''It must be in plain text'''. Once filled, it can be displayed as caption when editing a single template and perhaps in search results when users pick one of many. The default is &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt;&lt;br /&gt;
| Object containing [[#Param object|Param objects]]&lt;br /&gt;
| An object that maps each parameter name of the template to a corresponding [[#Param object|Param object]] describing the properties of that parameter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;paramOrder&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array containing parameter name strings&lt;br /&gt;
| The logical order in which parameters should be displayed. The array contains each parameter key exactly once. Each string must be a valid key in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; object. ''If this key does not exist in the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;templatedata&amp;gt;&amp;lt;/templatedata&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; structure on the template page, it is added to the structure provided by the API using the order in which the parameters occur within the TemplateData object.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sets&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array containing &amp;lt;br/&amp;gt;[[#Set object|Set objects]]&lt;br /&gt;
| An array containing set specifications. A set is a group of parameters that should be used together. The default is []. Note that the &amp;lt;code&amp;gt;sets&amp;lt;/code&amp;gt; functionality is still in development.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;format&amp;lt;/code&amp;gt;&lt;br /&gt;
| string, either &amp;lt;code&amp;gt;inline&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;block&amp;lt;/code&amp;gt;&lt;br /&gt;
| How the template's wikitext representation SHOULD be laid out. The default is &amp;lt;code&amp;gt;inline&amp;lt;/code&amp;gt;. See [[Help:TemplateData#Custom_formats]] for other custom formats.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;maps&amp;lt;/code&amp;gt;&lt;br /&gt;
| A [[#Maps object|Maps object]]&lt;br /&gt;
| An object that maps a simplified name of a third party consumer of the template data (i.e. [[Citoid]], [[Wikidata]], etc.) to an object that in turn maps a name of a consumer parameter to one or more corresponding names of template parameters.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Param object ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;Parameter Object&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Default !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; || [[#InterfaceText (string or object)|InterfaceText]]&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; || A (very) brief name for the parameter. Try to keep under 20-ish characters.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#InterfaceText (string or object)|InterfaceText]]&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;&lt;br /&gt;
| A brief description of the parameter, for users to know which to pick from an option list.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;required&amp;lt;/code&amp;gt;&lt;br /&gt;
| boolean&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
| Whether the parameter is required for the template to work (true if this parameter '''must''' be specified).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;suggested&amp;lt;/code&amp;gt;&lt;br /&gt;
| boolean&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;&lt;br /&gt;
| Whether the parameter is suggested for the template to be useful (true if this parameter '''should''' be specified).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deprecated&amp;lt;/code&amp;gt; || boolean or string&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; || Whether the parameter is deprecated; this can be a string of instructions for the user detailing what instead the user can do, or be simply &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;aliases&amp;lt;/code&amp;gt; || Array containing strings&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt; || List of aliases. An alias is an alternative name for the parameter that may be used instead of (not in addition to) the primary name. Aliases are not documented in a separate Parameter object. If they need more information, they should be in their own property marked &amp;quot;deprecated&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; || [[#InterfaceText (string or object)|InterfaceText]]&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; || The default value used by the template if no value is assigned to the parameter, or a description thereof.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;autovalue&amp;lt;/code&amp;gt; || string&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; || A dynamically-generated default value in wikitext, such as today's date or the editing user's name; this will often involve wikitext substitution, such as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{subst:CURRENTYEAR}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;example&amp;lt;/code&amp;gt;&lt;br /&gt;
|[[#InterfaceText (string or object)|InterfaceText]]&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;&lt;br /&gt;
|An example text for the parameter, to help users fill in the proper value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || string&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;&amp;quot;unknown&amp;quot;&amp;lt;/code&amp;gt; || The type of the parameter, for (soft) type hinting. One of:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;parameter types&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! String Value !! Type of Parameter&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;unknown&amp;quot; || Assumed type if not set&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;number&amp;quot; || Any numerical value (without decimal points or thousand separators)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;string&amp;quot; || Any textual value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;line&amp;quot; || Short text field – use for names, labels, and other short-form fields&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;boolean&amp;quot; || A boolean value ('1' for true, '0' for false, '&amp;lt;nowiki/&amp;gt;' for unknown), see [[wikipedia:Three-valued logic|three-valued logic]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;date&amp;quot; || A date in ISO 8601 format, e.g. &amp;quot;2014-05-09&amp;quot; or &amp;quot;2014-05-09T16:01:12Z&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;wiki-page-name&amp;quot; || A valid MediaWiki page name for the current wiki. Doesn't have to exist, but if not, should be a valid page name which could be created.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;wiki-file-name&amp;quot;&lt;br /&gt;
| A valid MediaWiki file name for the current wiki. Doesn't have to exist, but if not, should be a valid file name which could be uploaded. Should not include the namespace (''e.g.'' &amp;quot;Foo.svg&amp;quot; not &amp;quot;File:Foo.svg&amp;quot; or &amp;quot;Bild:Foo.svg&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;wiki-template-name&amp;quot;&lt;br /&gt;
| A valid MediaWiki Template name for the current wiki.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;wiki-user-name&amp;quot;&lt;br /&gt;
| A valid MediaWiki user name for the current wiki. Doesn't have to exist, but if not, should be a valid user name which could be created. Should not include the namespace (''e.g.'' &amp;quot;Foo&amp;quot; not &amp;quot;User:Foo&amp;quot; or &amp;quot;Usario:Foo&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;content&amp;quot; || Page content in wikitext, such as text style, links, images, ''etc.''&lt;br /&gt;
|-&lt;br /&gt;
| {{nowrap|&amp;quot;unbalanced-wikitext&amp;quot;}} || Raw wikitext that should not be treated as standalone content because it is unbalanced – for example, templates concatenating incomplete wikitext as a bigger whole, such as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{echo|before=&amp;lt;u&amp;gt;|after=&amp;lt;/u&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;inherits&amp;lt;/code&amp;gt; || string&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | ''none'' &amp;lt;br /&amp;gt; substituted || The name key of another parameter (must be a valid key in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; object). The current [[#Param object|Parameter Object]] will inherit properties from the specified [[#Param object|Parameter Object]], with local properties overriding the inherited ones.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Set object ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;Set Object&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
Key &lt;br /&gt;
!&lt;br /&gt;
Type &lt;br /&gt;
!&lt;br /&gt;
Default &lt;br /&gt;
!&lt;br /&gt;
Description&lt;br /&gt;
|-&lt;br /&gt;
| — &lt;br /&gt;
| Array of Arrays&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;  &lt;br /&gt;
| The type of the parameter, for (soft) type hinting. One of:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;Set&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
Set Object&lt;br /&gt;
&lt;br /&gt;
!&lt;br /&gt;
Key &lt;br /&gt;
!&lt;br /&gt;
Object or&lt;br /&gt;
primitive type &lt;br /&gt;
!&lt;br /&gt;
Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; &lt;br /&gt;
| [[#InterfaceText (string or object)|InterfaceText]] &lt;br /&gt;
| A (very) brief name for the parameter set. Try to keep under 20-ish characters.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; &lt;br /&gt;
| Array of strings &lt;br /&gt;
| One or more names of parameters to include in the set (each must be a valid key in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; object). A parameter may be in multiple sets. Not every parameter must be in a set.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Maps object ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;Maps Object&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
Key &lt;br /&gt;
!&lt;br /&gt;
Type &lt;br /&gt;
!&lt;br /&gt;
Default &lt;br /&gt;
!&lt;br /&gt;
Description&lt;br /&gt;
|-&lt;br /&gt;
| ''name of consumer''&lt;br /&gt;
| object&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | {}  &lt;br /&gt;
| An object that maps a ''name of a consumer'' to an object that in turn maps a ''name of a consumer parameter'' to one or more corresponding ''names of template parameters''.&lt;br /&gt;
&lt;br /&gt;
The ''names of the template parameters'' can be specified either as a string (one name), an array of strings (several names), or an array of arrays of strings (several sets of names); each of these strings must be a valid key in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; object elsewhere in the same template's TemplateData. &lt;br /&gt;
&lt;br /&gt;
A specific template parameter may be in multiple maps, and it may be used in the values of multiple keys in a given map, but not every template parameter ''must'' be in a map.&lt;br /&gt;
&lt;br /&gt;
A shortened example from English Wikipedia's [[w:Template:Cite_news#TemplateData|Template:Cite_news#TemplateData]] illustrates the structure of a maps object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;proveit&amp;quot;: {&lt;br /&gt;
		&amp;quot;main&amp;quot;: &amp;quot;title&amp;quot;,&lt;br /&gt;
		&amp;quot;textarea&amp;quot;: [&lt;br /&gt;
			&amp;quot;quote&amp;quot;&lt;br /&gt;
		]&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;citoid&amp;quot;: {&lt;br /&gt;
		&amp;quot;title&amp;quot;: &amp;quot;title&amp;quot;,&lt;br /&gt;
		&amp;quot;url&amp;quot;: &amp;quot;url&amp;quot;,&lt;br /&gt;
		&amp;quot;publisher&amp;quot;: &amp;quot;publisher&amp;quot;,&lt;br /&gt;
		&amp;quot;publicationTitle&amp;quot;: &amp;quot;work&amp;quot;,&lt;br /&gt;
		&amp;quot;date&amp;quot;: &amp;quot;date&amp;quot;,&lt;br /&gt;
		…&lt;br /&gt;
		&amp;quot;ISSN&amp;quot;: [&lt;br /&gt;
			&amp;quot;issn&amp;quot;&lt;br /&gt;
		],&lt;br /&gt;
		&amp;quot;ISBN&amp;quot;: [&lt;br /&gt;
			&amp;quot;isbn&amp;quot;&lt;br /&gt;
		],&lt;br /&gt;
		…&lt;br /&gt;
		&amp;quot;contributor&amp;quot;: &amp;quot;others&amp;quot;,&lt;br /&gt;
		&amp;quot;author&amp;quot;: [&lt;br /&gt;
			[&lt;br /&gt;
				&amp;quot;first&amp;quot;,&lt;br /&gt;
				&amp;quot;last&amp;quot;&lt;br /&gt;
			],&lt;br /&gt;
			[&lt;br /&gt;
				&amp;quot;first2&amp;quot;,&lt;br /&gt;
				&amp;quot;last2&amp;quot;&lt;br /&gt;
			],&lt;br /&gt;
			…&lt;br /&gt;
			[&lt;br /&gt;
				&amp;quot;first9&amp;quot;,&lt;br /&gt;
				&amp;quot;last9&amp;quot;&lt;br /&gt;
			]&lt;br /&gt;
		],&lt;br /&gt;
		&amp;quot;editor&amp;quot;: [&lt;br /&gt;
			[&lt;br /&gt;
				&amp;quot;editor-first&amp;quot;,&lt;br /&gt;
				&amp;quot;editor-last&amp;quot;&lt;br /&gt;
			]&lt;br /&gt;
		]&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== InterfaceText (string or object) ====&lt;br /&gt;
A free-form plain-text string (i.e. no wikitext or HTML) in the content-language of the wiki, or an object containing those strings keyed by language code.&lt;br /&gt;
&lt;br /&gt;
The default value for all InterfaceText fields is &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== String type =====&lt;br /&gt;
If it is a string, it must contain a non-localized string in the content language of the local wiki.&lt;br /&gt;
&lt;br /&gt;
===== Object type =====&lt;br /&gt;
If it is an object, the object must have this mapping:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;InterfaceText&amp;quot; style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; |  ''[[:en:List of Wikipedias|Wikipedia language code]]'' || string || Localized string for use on the Wikipedia corresponding to the given language code.&lt;br /&gt;
|}Example of object mapping:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;InterfaceText&amp;quot; style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Value&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;quot;en&amp;quot; || &amp;quot;Welcome to Wikipedia&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;quot;de&amp;quot; || &amp;quot;Willkommen bei Wikipedia&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;quot;fe&amp;quot; || &amp;quot;Bienvenue sur Wikipédia&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;quot;nl&amp;quot; || &amp;quot;Welkom op Wikipedia&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;quot;it&amp;quot; || &amp;quot;Benvenuti su Wikipedia&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;quot;es&amp;quot; || &amp;quot;Bienvenidos a Wikipedia&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | &amp;quot;ru&amp;quot; || &amp;quot;Добро пожаловать в Википедию&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
An example TemplateData structure as specified within wikitext on a template page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;description&amp;quot;: &amp;quot;Label unsigned comments in a conversation.&amp;quot;,&lt;br /&gt;
    &amp;quot;params&amp;quot;: {&lt;br /&gt;
        &amp;quot;user&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;User's name&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;wiki-user-name&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;User name of person who forgot to sign their comment.&amp;quot;,&lt;br /&gt;
            &amp;quot;aliases&amp;quot;: [&amp;quot;1&amp;quot;]&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;date&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Date&amp;quot;,&lt;br /&gt;
            &amp;quot;suggested&amp;quot;: true,&lt;br /&gt;
            &amp;quot;description&amp;quot;: {&lt;br /&gt;
                &amp;quot;en&amp;quot;: &amp;quot;Timestamp of when the comment was posted, in YYYY-MM-DD format.&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;aliases&amp;quot;: [&amp;quot;2&amp;quot;],&lt;br /&gt;
            &amp;quot;autovalue&amp;quot;: &amp;quot;{{subst:#time:Y-m-d}}&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;year&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Year&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;month&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Month&amp;quot;,&lt;br /&gt;
            &amp;quot;inherits&amp;quot;: &amp;quot;year&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;day&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Day&amp;quot;,&lt;br /&gt;
            &amp;quot;inherits&amp;quot;: &amp;quot;year&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;comment&amp;quot;: {&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;sets&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Date&amp;quot;,&lt;br /&gt;
            &amp;quot;params&amp;quot;: [&amp;quot;year&amp;quot;, &amp;quot;month&amp;quot;, &amp;quot;day&amp;quot;]&lt;br /&gt;
        }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;maps&amp;quot;: {&lt;br /&gt;
        &amp;quot;ExampleConsumer&amp;quot;: {&lt;br /&gt;
            &amp;quot;foo&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
            &amp;quot;bar&amp;quot;: [&amp;quot;year&amp;quot;, &amp;quot;month&amp;quot;, &amp;quot;day&amp;quot;],&lt;br /&gt;
            &amp;quot;quux&amp;quot;: [&lt;br /&gt;
                &amp;quot;date&amp;quot;,&lt;br /&gt;
                [&amp;quot;day&amp;quot;, &amp;quot;month&amp;quot;],&lt;br /&gt;
                [&amp;quot;month&amp;quot;, &amp;quot;year&amp;quot;],&lt;br /&gt;
                &amp;quot;year&amp;quot;&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Below is how the above example would be displayed on the template page:&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours&amp;quot; style=&amp;quot;margin: 2em; padding:1em 2em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;description&amp;quot;: &amp;quot;Label unsigned comments in a conversation.&amp;quot;,&lt;br /&gt;
    &amp;quot;params&amp;quot;: {&lt;br /&gt;
        &amp;quot;user&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;User's name&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;wiki-user-name&amp;quot;,&lt;br /&gt;
            &amp;quot;required&amp;quot;: true,&lt;br /&gt;
            &amp;quot;description&amp;quot;: &amp;quot;User name of person who forgot to sign their comment.&amp;quot;,&lt;br /&gt;
            &amp;quot;aliases&amp;quot;: [&amp;quot;1&amp;quot;]&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;date&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Date&amp;quot;,&lt;br /&gt;
            &amp;quot;suggested&amp;quot;: true,&lt;br /&gt;
            &amp;quot;description&amp;quot;: {&lt;br /&gt;
                &amp;quot;en&amp;quot;: &amp;quot;Timestamp of when the comment was posted, in YYYY-MM-DD format.&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;aliases&amp;quot;: [&amp;quot;2&amp;quot;],&lt;br /&gt;
            &amp;quot;autovalue&amp;quot;: &amp;quot;{{subst:#time:Y-m-d}}&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;year&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Year&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;month&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Month&amp;quot;,&lt;br /&gt;
            &amp;quot;inherits&amp;quot;: &amp;quot;year&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;day&amp;quot;: {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Day&amp;quot;,&lt;br /&gt;
            &amp;quot;inherits&amp;quot;: &amp;quot;year&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;comment&amp;quot;: {&lt;br /&gt;
            &amp;quot;required&amp;quot;: false&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;sets&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Date&amp;quot;,&lt;br /&gt;
            &amp;quot;params&amp;quot;: [&amp;quot;year&amp;quot;, &amp;quot;month&amp;quot;, &amp;quot;day&amp;quot;]&lt;br /&gt;
        }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;maps&amp;quot;: {&lt;br /&gt;
        &amp;quot;ExampleConsumer&amp;quot;: {&lt;br /&gt;
            &amp;quot;foo&amp;quot;: &amp;quot;user&amp;quot;,&lt;br /&gt;
            &amp;quot;bar&amp;quot;: [&amp;quot;year&amp;quot;, &amp;quot;month&amp;quot;, &amp;quot;day&amp;quot;],&lt;br /&gt;
            &amp;quot;quux&amp;quot;: [&lt;br /&gt;
                &amp;quot;date&amp;quot;,&lt;br /&gt;
                [&amp;quot;day&amp;quot;, &amp;quot;month&amp;quot;],&lt;br /&gt;
                [&amp;quot;month&amp;quot;, &amp;quot;year&amp;quot;],&lt;br /&gt;
                &amp;quot;year&amp;quot;&lt;br /&gt;
            ]&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
See the generated help at [[Special:ApiHelp/templatedata]].  A sample invocation (formatted for human readability) is: &lt;br /&gt;
{{ApiEx&lt;br /&gt;
| p1=action=templatedata&lt;br /&gt;
| p2=titles=Template:Cite%20web&lt;br /&gt;
| p3=format=jsonfm&lt;br /&gt;
}}&lt;br /&gt;
This returns the template data for [[:en:Template:Cite web|Template:Cite web]]. The &amp;lt;nowiki&amp;gt;&amp;lt;templatedata&amp;gt;...&amp;lt;/templatedata&amp;gt;&amp;lt;/nowiki&amp;gt; block for this template is on its transcluded template documentation page, [[:en:Template:Cite web/doc]].&lt;br /&gt;
&lt;br /&gt;
=== Additions and changes to JSON as received from the API ===&lt;br /&gt;
&lt;br /&gt;
The JSON structure provided in response to an API HTTP get request is significantly different than that which is defined in the &amp;lt;nowiki&amp;gt;&amp;lt;templatedata&amp;gt;...&amp;lt;/templatedata&amp;gt;&amp;lt;/nowiki&amp;gt; block. In response to the API request, extension TemplateData makes the following changes to the JSON object:&lt;br /&gt;
* Adds two [[#Wrapper Objects from API|wrapping objects]]:&lt;br /&gt;
:# An overall [[#Pages Object|Pages Object]] containing one or more [[#Page Object|Page Object]]s&lt;br /&gt;
:# An object with a numeric key: a [[#Page Object|Page Object]]&lt;br /&gt;
* Additions/changes to the actual [[#TemplateData Object|TemplateData Object]]&lt;br /&gt;
:# Add the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; key with the name of the page from which the data was requested (e.g. &amp;quot;Template:Cite web&amp;quot;).&lt;br /&gt;
:# Add the &amp;lt;code&amp;gt;paramOrder&amp;lt;/code&amp;gt; key and array using the order in which the parameters occur in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; key within the [[#TemplateData Object|TemplateData Object]] on the template page.&lt;br /&gt;
:# Add the &amp;lt;code&amp;gt;sets&amp;lt;/code&amp;gt; key&lt;br /&gt;
:# Change all TemplateText occurrences that are just strings to objects with a single key for the current wiki's [[:en:List of Wikipedias|Wikipedia language code]]&lt;br /&gt;
:# Remove all &amp;lt;code&amp;gt;inherits&amp;lt;/code&amp;gt; keys.&lt;br /&gt;
:::*Add all properties from parameter from which an inheritance is defined which are not superseded by explicitly defined keys in the inheritor's [[#Param object|Parameter Object]].&lt;br /&gt;
:# &amp;lt;li value=&amp;quot;6&amp;quot;&amp;gt;Add default values for all keys in each [[#Param object|Parameter Object]] which have not been explicitly defined or inherited.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Visualised differences in a TemplateData JSON object delivered by the API===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;Wrapper Objects from API&amp;quot;&lt;br /&gt;
|+ Wrapper objects added to JSON delivered by API&amp;lt;br/&amp;gt;&amp;lt;span style=&amp;quot;font-weight:normal;&amp;quot;&amp;gt;These are not defined in the JSON object enclosed by the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;templatedata&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags on the template page.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;Pages Object&amp;quot;&lt;br /&gt;
|+ JSON Root&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pages&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#Page Object|Page Object]]&lt;br /&gt;
| The page object (contains one key which is the page number). If multiple pages were requested at one time there will be multiple Page Objects.&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;br/&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;Page Object&amp;quot;&lt;br /&gt;
|+ Page Object&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| {{nowrap|(page number)}}&lt;br /&gt;
| [[#TemplateData Object|TemplateData Object]]&lt;br /&gt;
| The [[#TemplateData Object|TemplateData Object]] containing the information payload.  The key is a static page number for the template page from which the JSON data was requested.&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;TemplateData Object Additions by API&amp;quot;&lt;br /&gt;
|+ TemplateData Object (added by API)&amp;lt;br/&amp;gt;&amp;lt;span style=&amp;quot;font-weight:normal;&amp;quot;&amp;gt;The following key is added to the root of the JSON object which is enclosed in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;templatedata&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags on the template page.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Default !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;&lt;br /&gt;
| string&lt;br /&gt;
| The page name of the template (e.g. &amp;quot;Template:Cite web&amp;quot;). &amp;lt;br/&amp;gt;This key is ''not'' contained in the JSON structure on the template page. It is added to the structure by the MediaWiki software in route to delivery via the API.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;paramOrder&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array containing parameter name strings&lt;br /&gt;
| The logical order in which parameters should be displayed. The array contains each parameter key exactly once. Each string must be a valid key in the &amp;lt;code&amp;gt;params&amp;lt;/code&amp;gt; object. &amp;lt;br/&amp;gt;''If this does not exist in the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;templatedata&amp;gt;&amp;lt;/templatedata&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; structure on the template page, it is added to the structure as provided by the API using the order in which the parameters occur within the TemplateData object.''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sets&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array containing [[#Set object|Set Objects]]&lt;br /&gt;
| An array containing set specifications. A set is a group of parameters that should be used together. &amp;lt;br/&amp;gt;''If this does not exist on the template page it is added as an empty array to the structure provided by the API.''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;Parameter Object from API&amp;quot;&lt;br /&gt;
|+ Parameter Objects from API&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; || [[#InterfaceText (string or object)|InterfaceText]] || translated to [[#InterfaceText (string or object)|InterfaceText]] object, if not already in that format.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;required&amp;lt;/code&amp;gt; || boolean || If not defined, default value of '''false''' added.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt; || [[#InterfaceText (string or object)|InterfaceText]] or &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; || If defined as a string, converted to a [[#InterfaceText (string or object)|InterfaceText]] object.  If not defined, key is added with a &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt; value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deprecated&amp;lt;/code&amp;gt; || boolean or string || If not defined, default value of '''false''' added.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;aliases&amp;lt;/code&amp;gt; || Array of strings ||  If not defined, a default empty array is assigned (i.e. [] ).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; || string || If not defined, default of &amp;quot;&amp;quot; is assigned.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || string || If not defined, default of &amp;quot;unknown&amp;quot; is assigned.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;inherits&amp;lt;/code&amp;gt; || removed || This key is removed and all inherited keys are added. Keys defined for the current parameter take precedence and any keys not defined on either the current param, or the one from which it inherits are given the default value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; id=&amp;quot;InterfaceText&amp;quot; style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
|+ InterfaceText (Object or &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;):&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-weight:normal;&amp;quot;&amp;gt;An object containing strings keyed by language code.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Object or&amp;lt;br/&amp;gt;primitive type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; style=&amp;quot;text-align: center;font-weight:bold;&amp;quot;  | Object &amp;lt;br/&amp;gt;&amp;lt;span style=&amp;quot;font-weight:normal;&amp;quot;&amp;gt;(containing localized strings by [[:en:List of Wikipedias|Wikipedia language code]])&amp;lt;br/&amp;gt;If a TemplateData field on the template page contains a string, not an object with localized strings, MediaWiki translates it into an InterfaceText Object with a string assigned to the key name of the source Wikipedia [[:en:List of Wikipedias|Wikipedia language code]]. The default for all InterfaceText fields is &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot; | (Wiki language code) || string || Localized string for use on the Wikipedia corresponding to the [[:en:List of Wikipedias|Wikipedia language code]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example of JSON object provided by API ===&lt;br /&gt;
&lt;br /&gt;
The response to an API request for the TemplateData structure in the [[#Example of TemplateData structure WikiText on template page|Example of TemplateData structure WikiText on template page]] section (above) can be seen:&lt;br /&gt;
* In HTML format: https://www.mediawiki.org/w/api.php?action=templatedata&amp;amp;titles=Extension:TemplateData&amp;amp;format=jsonfm&lt;br /&gt;
* As delivered by the API: https://www.mediawiki.org/w/api.php?action=templatedata&amp;amp;titles=Extension:TemplateData&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== Configuration == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! &amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; Variable&amp;lt;/translate&amp;gt;&lt;br /&gt;
! &amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; Default&amp;lt;/translate&amp;gt;&lt;br /&gt;
! &amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt; Description&amp;lt;/translate&amp;gt;&lt;br /&gt;
|---&lt;br /&gt;
| &amp;lt;code&amp;gt;$wgTemplateDataUseGUI&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt; Experimental dialog interface to edit templatedata JSON&amp;lt;/translate&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
== See also == &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
* {{ll|Extension:TemplateWizard}}&amp;amp;nbsp;– user interface for selecting and inserting templates' wikitext, based on their TemplateData.&lt;br /&gt;
* [https://github.com/jeblad/TemplateData GitHub: jeblad/TemplateData] – alternate version with some Lua functionality.&lt;br /&gt;
&lt;br /&gt;
{{OnWikimedia}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Metadata{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>interwiki&gt;Hildeoc</name></author>
	</entry>
</feed>