TemplateData demo
| TemplateData | |
|---|---|
| Documentation | |
| Maintained by WikiTeq? |
No |
| Bundled | Since version 1.35 |
| Version | |
This wiki has the TemplateData extension installed, which allows adding structured documentation about the parameters of templates that is available when templates are added using either the wikitext editor or VisualEditor.
The current template data that is used by Template:Extension demo (which creates the infobox visible on the top right of this page) is shown below - technically this also tells the system data about how to use this page as a template.
Syntax:
<templatedata>
{
"params": {
"extension": {
"label": "Extension name",
"description": "Name of the extension",
"example": "AbuseFilter",
"type": "string",
"required": true
},
"image": {
"label": "Image",
"description": "Example image",
"type": "wiki-file-name"
},
"doc-url": {
"label": "Documentation URL",
"description": "URL of documentation NOT on mediawiki.org",
"example": "https://github.com/WikiTeq/mediawiki-extension-RemoteWiki",
"type": "url"
},
"doc-label": {
"label": "Documentation label for non-MediaWiki.org pages",
"description": "Display text for link to documentation not on MediaWiki.org",
"example": "on GitHub",
"type": "string"
},
"doc-page": {
"label": "Documentation page",
"description": "Title of documentation page on MediaWiki.org, will be prefixed with Special:MyLanguage/",
"example": "Extension:AbuseFilter",
"type": "string",
"suggested": true
},
"wikiteq-maintained": {
"label": "WikiTeq maintained",
"description": "Identifies the extension as one maintained by WikiTeq",
"example": "true",
"type": "boolean"
},
"bundled": {
"label": "Bundled",
"description": "The version the extension was first bundled with MediaWiki",
"example": "1.35",
"type": "unknown"
}
},
"description": "Infobox for an extension",
"format": "block"
}
</templatedata>
Result:
Infobox for an extension
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Extension name | extension | Name of the extension
| String | required |
| Image | image | Example image | File | optional |
| Documentation URL | doc-url | URL of documentation NOT on mediawiki.org
| URL | optional |
| Documentation label for non-MediaWiki.org pages | doc-label | Display text for link to documentation not on MediaWiki.org
| String | optional |
| Documentation page | doc-page | Title of documentation page on MediaWiki.org, will be prefixed with Special:MyLanguage/
| String | suggested |
| WikiTeq maintained | wikiteq-maintained | Identifies the extension as one maintained by WikiTeq
| Boolean | optional |
| Bundled | bundled | The version the extension was first bundled with MediaWiki
| Unknown | optional |