Help:TemplateData/ilo



Ania kadi ti TemplateData?
Ti TemplateData ket isu ti waya ti panagipenpen ti pakaammo a maipanggep ti plantilia ken dagiti parametrona, tapno ti VisualEditor ket makaala ket makaiparang daytoy idiay editor ti plantilia, tapno mapalaka ti agurnos kadagiti plantilia.

Ti TemplateData ket mangpalubos kadagiti agara-aramat ti agsurat kadagiti bassit a naestruktura a datos iti panid ti plantilia, wenno mailak-amto iti dayta a panid ti plantilia (a kas idiay panid ti dokumentasion). Kalpasanton no adda daytoy ti naestruktura a datos, mabalinton a husto a maiparang iti VisualEditor. Bayat a daytoy ket kasla narigat, daytoy ket pudno a nalaka met.



Estruktura ti TemplateData
Ti estruktura ti TemplateData ket naibatay iti alagaden ti JSON, ken silple met laeng daytoy. Laglagipen nga amin dagiti deskripsion iti TemplateData ket nasken a naranas a testo (awan ti wikitext, wenno silsilpo, kdpy).

Ti umuna nga aramiden ket ti panangimakinilia ti paris dagiti etiketa ti, iti aniaman a lugar ti dokumentasion a subpanid ti plantilia, kasla daytoy:

Daytoy ket mangibaga ti sopwer nga amin nga adda ti baetan dagitoy dua nga etiketa ket ti TemplateData, ken nasken a maibasaran no mausar ti plantilia.



Kas pagarigan
Dagiti deskripsion ti uneg ti TemplateData ket sumurot ti alagaden a tabas; kunatayo koma nga addaanka ti plantilia a tinawtawagan ti "Commons" para iti panagisilpo ti kategoria ti Commons a maipanggep ti topiko. Daytoy ket mangala ti maysa a nasken a parametro: ti nagan ti kategoria idiay Commons. Ti TemplateData ket kastoyto ti kitana:

Daytoy ket mangiparangto, iti plantilia, a kastoy: {       "description": "Ti plantilia para iti panagisilpo ti kategoria idiay commons a maipanggep ti maysa nga artikulo", "params": { "1": {                       "label": "Kategoria ti Commons", "description": "Ti kategoria ti commons a kayatmo nga isilpo.", "default": "Category:CommonsRoot", "type": "string", "required": true }       } }



Deskripsion ken dagiti parametro
Once you're done, hit "save". If you've made errors, it will not let you save (which is disruptive, but means you can't break anything). Should you run into errors, explain on the feedback page what you were trying to do, and we will be happy to help.

Note that each bit of information is enclosed in quotation marks (except for  and  ), and separated from the next bit by a comma (unless it's the last one).



Parameter aliases
Some templates allow a same parameter to have different names.

For example,  could also be written as   or.

To add this information to TemplateData, you simply need to add the aliases to the parameter's information:



Multiple parameters
If you have multiple parameters, just repeat each section (starting from the "1" tag) and fill it out as you see fit. Note that if a template has multiple parameters, you need to separate them with a comma in the templatedata, like so:



Similar parameters
When a template has multiple parameters, sometimes some of them can be of the same kind. In this case, you only need to provide full properties for the first one, and the others can "inherit" their properties from it.



Blank boilerplate
You can copy the blank boilerplate below to add new TemplateData to a template. Only the most common tags are included.



Limitations and questions

 * Missing features — TemplateData is very much an example of tool that was made available with few features, in hope that users would help to guide development of features that they desired. If you'd like to request new features for TemplateData, please let us know.
 * Delays in showing in templates — After adding TemplateData to a template, the metadata should be visible immediately when the template is opened in VisualEditor. However, it is possible that it takes hours before the metadata show. You can force an update by making a null edit to the template page itself (not the documentation subpage). To perform a null edit, open the template page for editing, and save the page without making any change.
 * Current issues — A list of current bugs and feature requests is available in bugzilla.



Tools

 * TemplateDataEditor — A user script that makes the process of adding TemplateData easier. It currently exists in English and French, and can easily be translated into other languages.
 * TemplateData Wizard — A tool that generates TemplateData through an interactive interface.
 * Skeleton TemplateData generator — A tool that reads the source wikicode of a template, tries to find all the parameters used and outputs a skeleton document with the parameters listed.
 * JSONLint — A tool that allows you to validate manually-written JSON to help find errors in the syntax.