TemplateData demo

From Notaclue Wiki
Extension demonstration (infobox template)
TemplateData
Documentation

on mediawiki.org

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

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Extension nameextension

Name of the extension

Example
AbuseFilter
Stringrequired
Imageimage

Example image

Fileoptional
Documentation URLdoc-url

URL of documentation NOT on mediawiki.org

Example
https://github.com/WikiTeq/mediawiki-extension-RemoteWiki
URLoptional
Documentation label for non-MediaWiki.org pagesdoc-label

Display text for link to documentation not on MediaWiki.org

Example
on GitHub
Stringoptional
Documentation pagedoc-page

Title of documentation page on MediaWiki.org, will be prefixed with Special:MyLanguage/

Example
Extension:AbuseFilter
Stringsuggested
WikiTeq maintainedwikiteq-maintained

Identifies the extension as one maintained by WikiTeq

Example
true
Booleanoptional
Bundledbundled

The version the extension was first bundled with MediaWiki

Example
1.35
Unknownoptional
Cookies help us deliver our services. By using our services, you agree to our use of cookies.