Wikipedia:TemplateData

À prupositu di Wikipedia
Jump to navigation Jump to search

(in inglesu)

[[Category:Errore Lua in Modulo:Pagetype alla linea 207: attempt to concatenate field 'plural' (a nil value). with short description]]

Template:Out of date

What is TemplateData?[edità a fonte]

TemplateData is the standardized description of a template, used by VisualEditor, the 2017 wikitext editor and other tools to improve the template-editing experience for the user. Both VisualEditor and the 2017 wikitext editor include a wizard to edit templates, but for the wizard to be most useful, it needs to present specific information to the user about each template, such as a short description of the template's purpose and its parameters. This information is codified formally (by any wiki editor) using TemplateData.

Editing without TemplateData[edità a fonte]

Without TemplateData, each parameter needs to be added manually when inserting a new template.

VisualEditor - Template without TemplateData.png

No information is provided about what the value of the parameter should be.

VisualEditor - Template without TemplateData2.png

Editing with TemplateData[edità a fonte]

With TemplateData, a list of supported parameters (and their description) is provided for the template.

VisualEditor - Template with TemplateData1.png

TemplateData provides context for each parameter, and makes it much easier for users to modify templates.

VisualEditor - Template with TemplateData2.png

Adding TemplateData[edità a fonte]

Anyone can help by adding TemplateData to templates (particularly high-profile ones, such as infoboxes) so that they are easier to edit in VisualEditor. The following is a minimal example, placed on a template's documentation page:

<templatedata>{
  "description": "insert description here",
  "params": {
    "first parameter": {
      "label": "x",
      "description": "x",
      "type": "string",
      "default": "default value",
      "required": false
    }
  }
}</templatedata>

You can also add or edit TemplateData using a GUI, by pressing the following button which appears at the top of the edit page: Manage TemplateData

The TemplateData tutorial explains in detail how to add TemplateData information to a template.

See also[edità a fonte]
https://co.wikipedia.org/wiki/Wikipedia:TemplateData
co.wikipedia.org
crawl=CC-MAIN-2022-33
62893
application/http; msgtype=response
sha1:W2NZ4BXE32CCHPZBWWVDPBOZ7E4DQ2MK
<urn:uuid:a3898652-956f-42f6-8946-978d60bee08d>
2022-08-10T17:41:40Z
208.80.154.224
text/html
sha1:EAGM4D7NWGMNO5RUDIXDBL3UKAZDD3O6
<urn:uuid:06d0646a-8a75-46f6-9591-809d0521aa2b>
https://co.wikipedia.org/wiki/Wikipedia:TemplateData
response
<urn:uuid:81c19a54-980f-4f41-b0df-e324f54d857a>
isPartOf: CC-MAIN-2022-33
publisher: Common Crawl
description: Wide crawl of the web for August 2022
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-65
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/