Razlika između verzija stranice "Wikipedia:Vizualni uređivač/TemplateData"
sa en.wiki |
(Nema razlike)
|
Verzija na dan 25 august 2013 u 20:43
Ovaj članak nije preveden ili je djelimično preveden. |
Šta je TemplateData?
VisualEditor, the visual interface to edit wiki pages, includes a wizard to easily edit templates. However, in order for that tool to be most useful, it needs to be able to pull information about the template; mostly, it needs a list of possible parameters for the template, and their characteristics.
Bez TemplateData
Without TemplateData, each parameter needs to be added manually when inserting a new template. | |
No information is provided about what the value of the parameter should be. |
Sa TemplateData
With TemplateData, a list of supported parameters (and their description) is provided for the template. | |
TemplateData provides context for each parameter, and makes it much easier for users to modify templates. |
Adding TemplateData
One of the things we need volunteers to do is the adding of TemplateData to templates (particularly high-profile ones, such as infoboxes) so that they are easy to edit. A minimal example, placed on a template's documentation page, is:
<templatedata>{
"description": "insert description here",
"params": {
"first parameter": {
"label": "x",
"description": "x",
"type": "string",
"default": "default value",
"required": false
}
}
}</templatedata>
en:Wikipedia:VisualEditor/TemplateData tutorial explains how to add TemplateData information to a template.
You can probably think of some pretty important templates on your wiki very easily; experienced users know pretty well which templates are a big deal, and will inevitably find out when they try to use them and discover there isn't any TemplateData.