<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.therofl98.co/w/index.php?action=history&amp;feed=atom&amp;title=The_TTSCpedia%3ATemplateData</id>
	<title>The TTSCpedia:TemplateData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.therofl98.co/w/index.php?action=history&amp;feed=atom&amp;title=The_TTSCpedia%3ATemplateData"/>
	<link rel="alternate" type="text/html" href="https://wiki.therofl98.co/w/index.php?title=The_TTSCpedia:TemplateData&amp;action=history"/>
	<updated>2026-06-04T05:20:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.therofl98.co/w/index.php?title=The_TTSCpedia:TemplateData&amp;diff=2772&amp;oldid=prev</id>
		<title>FairPlay137: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.therofl98.co/w/index.php?title=The_TTSCpedia:TemplateData&amp;diff=2772&amp;oldid=prev"/>
		<updated>2019-03-06T03:14:39Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&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;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:14, 5 March 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>FairPlay137</name></author>
	</entry>
	<entry>
		<id>https://wiki.therofl98.co/w/index.php?title=The_TTSCpedia:TemplateData&amp;diff=2771&amp;oldid=prev</id>
		<title>commons&gt;Perhelion: added Category:TemplateDataEditor using HotCat</title>
		<link rel="alternate" type="text/html" href="https://wiki.therofl98.co/w/index.php?title=The_TTSCpedia:TemplateData&amp;diff=2771&amp;oldid=prev"/>
		<updated>2017-03-22T00:31:18Z</updated>

		<summary type="html">&lt;p&gt;added &lt;a href=&quot;/w/index.php?title=Category:TemplateDataEditor&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:TemplateDataEditor (page does not exist)&quot;&gt;Category:TemplateDataEditor&lt;/a&gt; using &lt;a href=&quot;/w/index.php?title=Help:Gadget-HotCat&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Help:Gadget-HotCat (page does not exist)&quot;&gt;HotCat&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{TemplateDataInfo}}&lt;br /&gt;
&lt;br /&gt;
== Using [[Template:TemplateBox|TemplateBox]] ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
Every entity, except &amp;#039;&amp;#039;&amp;#039;inherit&amp;#039;&amp;#039;&amp;#039; that is documented at [[:mw:Extension:TemplateData|the TemplateData technical documentation]], is supported by {{tl|TemplateBox}}. Conversion to JSON is done by a LUA module. The LUA module automatically converts traditionally used parameters as well as the new ones to both, TemplateData, as well as the &amp;quot;historic table&amp;quot;, on demand. The &amp;quot;historic table&amp;quot; is the table which was used to show parameter information at Wikimedia Commons before TemplateData was invented.&lt;br /&gt;
&lt;br /&gt;
;Required parameters&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|desc=&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (or in its translated form), parameters and their description&lt;br /&gt;
&lt;br /&gt;
{{anchor|Translation}}&lt;br /&gt;
;Translation&lt;br /&gt;
* Avoid {{tl|LangSwitch}}. It doesn&amp;#039;t work in TemplateData.&lt;br /&gt;
* Append [[:en:ISO 639-1|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;-langcode&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;]] to the name of any translatable parameter, marked by {{TemplateBox/use suffix}} in [[Template:TemplateBox#Parameters|TemplateBox]]. For example, adding the French translation of the description of parameter 1, you would write &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|1d-fr=C&amp;#039;est la description pour paramètre un.&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Supplying only &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|1d-en=This is the description of parameter 1.&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|1d=This is the description of parameter 1.&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; will also work. The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;-en&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;-style is recommended because it eases the job for translators. They then recognize the structure behind it without having to consult the documentation.&lt;br /&gt;
* The language code must be the last element. Valid: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|1d-td-en=&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Invalid: &amp;lt;s&amp;gt;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|1d-en-td=&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Naming&lt;br /&gt;
* Both, old names and new names are supported but treated differently if both of them are supplied.&lt;br /&gt;
** For example, while creating the &amp;quot;historic table&amp;quot;, if both &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;1def&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;1default&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; where supplied, the value for &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;1def&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; would be used. For generating TemplateData, the preference is the other way around.&lt;br /&gt;
&lt;br /&gt;
;Overriding&lt;br /&gt;
* It&amp;#039;s possible to override a specific entity, either for the &amp;quot;historic table&amp;quot; or for TemplateData.&lt;br /&gt;
** To override for TemplateData, append a &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;-td&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to the parameter&amp;#039;s default name.&lt;br /&gt;
** On the other hand, if you coded something for TemplateData and want to use a link or other markup in the &amp;quot;historic table&amp;quot;, use the parameter name without the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;-td&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; or modify that, which should be only used for TemplateData appending &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;-td&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;Pay attention:&lt;br /&gt;
* TemplateData does not support parsing Wiki-Markup. Think of it as if it would expand all templates and finally putting a nowiki around all this.&lt;br /&gt;
* When including templates, they must be wrapped them in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;s, &amp;#039;&amp;#039;if they should not be expanded&amp;#039;&amp;#039; (it&amp;#039;s, on the other hand, a geeky feature that you can use, if having the expanded content inside TemplateData is exactly what you &amp;#039;&amp;#039;want&amp;#039;&amp;#039;).&lt;br /&gt;
* Even though some tags, such as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; seem to be rendered as expected, avoid them.&lt;br /&gt;
&lt;br /&gt;
;Activation:&lt;br /&gt;
* TemplateData can be activated setting the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;useTemplateData&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parameter to &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;1&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; or to &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;only&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. The former will add a collapsed version of the table; the latter one replaces the &amp;quot;historic table&amp;quot; with the TemplateData table. In both cases, TemplateData is available through the API.&lt;br /&gt;
&lt;br /&gt;
;Fetching TemplateData (e.g. for TemplateBox itself)&lt;br /&gt;
[//commons.wikimedia.org/wiki/Special:ApiSandbox#action=templatedata&amp;amp;format=json&amp;amp;titles=Template%3ATemplateBox /w/api.php?action=templatedata&amp;amp;format=json&amp;amp;titles=Template%3ATemplateBox] ([//commons.wikimedia.org/w/api.php?action=templatedata&amp;amp;format=json&amp;amp;titles=Template%3ATemplateBox raw result], [//commons.wikimedia.org/w/api.php?action=templatedata&amp;amp;format=jsonfm&amp;amp;titles=Template%3ATemplateBox pretty result])&lt;br /&gt;
&lt;br /&gt;
;Advantages:&lt;br /&gt;
* No type-mixture: Instead of inserting a new content-type, a template can be used.&lt;br /&gt;
* Syntax: Less error-prone compared to editing JSON (without a special editor).&lt;br /&gt;
* Schema: Always valid. TemplateBox always passes a structure matching the requested schema.&lt;br /&gt;
* Flat structure.&lt;br /&gt;
* Prepared for future changes. Adjustments to the LUA module can be made to support future changes. The power of control remains at Commons.&lt;br /&gt;
* Inserting redundant information can be avoided.&lt;br /&gt;
* Template traditionally used at Commons.&lt;br /&gt;
&lt;br /&gt;
;Issues:&lt;br /&gt;
* Grouping sets is currently not supported in the &amp;quot;historic table&amp;quot;. Set labels are not supported to be multilingual (ideas how one could achieve this are truly welcome).&lt;br /&gt;
&lt;br /&gt;
;Example:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow:auto;&amp;quot;&amp;gt;&lt;br /&gt;
{{TemplateBox&lt;br /&gt;
&lt;br /&gt;
  | useTemplateData = 1&lt;br /&gt;
  | 1 = artist&lt;br /&gt;
  | 1aliases = Artist&lt;br /&gt;
  | 1label-en = Artist&lt;br /&gt;
  | 1type = string&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- used as the parameter description in the main parameter area of the documentation --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- and in the template data section unless overridden with 1d-td-langcode --&amp;gt;  &lt;br /&gt;
  | 1d-de = Künstler, der das ursprüngliche Kunstwerk geschaffen hat.&amp;lt;br/&amp;gt;Benutze möglichst immer &amp;lt;nowiki&amp;gt;{{Creator:Vorname Nachname}}&amp;lt;/nowiki&amp;gt; mit der Vorlage {{Tl|Creator}}.&lt;br /&gt;
  | 1d-en = Artist who created the original artwork.&amp;lt;br/&amp;gt;Use &amp;lt;nowiki&amp;gt;{{Creator:Name Surname}}&amp;lt;/nowiki&amp;gt; with {{Tl|Creator}} template whenever possible.&lt;br /&gt;
  | 1d-fr = Artiste ou artisan à l&amp;#039;origine de l&amp;#039;œuvre.&amp;lt;br/&amp;gt;Dans la mesure du possible, utiliser le modèle {{Tl|Creator}}.&lt;br /&gt;
  | 1d-sv = Artist som skapade originalverket.&amp;lt;br/&amp;gt;Använd &amp;lt;nowiki&amp;gt;{{Creator:Förnamn Efternamn}}&amp;lt;/nowiki&amp;gt; med {{Tl|Creator}}-mallen om detta är möjligt.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- this overrides 1d-en in the Template data section --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- and all other translations unless each is provided as desc-td-langcode --&amp;gt;&lt;br /&gt;
  | 1d-td-en = Artist who created the original artwork; this overrides &amp;quot;1d-en&amp;quot; in the Template data section; &amp;quot;1d-en&amp;quot; is used in the template &amp;quot;Parameter&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
  | 1def-de = Freifeld, angezeigt als: &amp;quot;{{int:wm-license-information-author}}&amp;quot;.&lt;br /&gt;
  | 1def-en = blank field presented as: &amp;quot;{{int:wm-license-information-author}}&amp;quot;.&lt;br /&gt;
  | 1def-fr = champ vide: « {{int:wm-license-information-author}} »&lt;br /&gt;
  | 1def-sv = tomt fält, visas som: &amp;quot;{{int:wm-license-information-author}}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- used as the description of the template in the main documentation area --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- and in the Template data section unless overridden with desc-td-langcode --&amp;gt;&lt;br /&gt;
  | desc-de = Deutsche Übersetzung der {{tl|Vorlagen}}beschreibung&lt;br /&gt;
  | desc-en = English translation of the {{tl|template}} description&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- this overrides desc-en in the Template data section --&amp;gt;&lt;br /&gt;
  &amp;lt;!-- and all other translations unless each is provided as desc-td-langcode --&amp;gt;&lt;br /&gt;
  | desc-td-en = English translation that is used in the Template data section instead of &amp;quot;desc-en&amp;quot;. This will also replace all desc-langcode translations, unless corresponding &amp;quot;desc-td-langcode&amp;quot; is provided.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A live example is [[Template:Information/doc]] ([//commons.wikimedia.org/w/index.php?title=Template%3AInformation%2Fdoc&amp;amp;diff=102133596&amp;amp;oldid=101526770 edit that enabled TemplateData through TemplateBox], [//commons.wikimedia.org/w/api.php?action=templatedata&amp;amp;format=jsonfm&amp;amp;titles=Template%3AInformation API-result showing the JSON generated by the Lua Module behind TemplateBox])&lt;br /&gt;
&lt;br /&gt;
;Experimenting:&lt;br /&gt;
You can use [[Special:ExpandTemplates]] to experiment with how the template will output the template documentation and the Template data section; e.g., copy the example above and paste it into the input text on the [[Special:ExpandTemplates]] page; then click on the ok button to see the result.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Commons help]]&lt;br /&gt;
[[Category:TemplateDataEditor]]&lt;/div&gt;</summary>
		<author><name>commons&gt;Perhelion</name></author>
	</entry>
</feed>