Commons:TemplateData: Difference between revisions

Content deleted Content added
m +live example
Line 25:
;Pay attention:
* 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.
* When including templates, they must be wrapped them in <code><nowiki><nowiki></nowiki></code>s, ''if they should not be expanded'' (it's, on the other hand, a geeky feature that you can use, if having the expanded content inside TemplateData is exactly what you ''want'').
* Even though some tags, such as <code><nowiki><pre></nowiki></code> seem to be rendered as expected, avoid them.
 
Line 44:
 
;Issues:
* Grouping sets is currently not supported in the "historic table". Set labels are not supported to be multilingual (ideas how one could achieve this are truly welcome).
 
;Example:
Line 57:
}}
</pre>
A live example is [[Template:Information/doc]] ([//commons.wikimedia.org/w/index.php?title=Template%3AInformation%2Fdoc&diff=102133596&oldid=101526770 edit that enabled TemplateData through TemplateBox], [//commons.wikimedia.org/w/api.php?action=templatedata&format=jsonfm&titles=Template%3AInformation API-result showing the JSON generated by the Lua Module behind TemplateBox])
</onlyinclude>