Template:TemplateData header
TemplateData for TemplateData header
| This template is used on approximately 18,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
| This template uses Lua: |
The {{TemplateData header}} template inserts a brief header for the TemplateData section and automatically adds the page to Category:Templates using TemplateData.
Usage
| Other section headings such as Usage or Parameters are also acceptable. |
== TemplateData ==
{{TemplateData header}}
<templatedata>{
…
}</templatedata>
Optional parameters
Add an optional unnamed parameter containing a template name (be sure to omit the namespace, as in {{TemplateData header|Example}}) to override the default reference to the transcluding page (as output by the {{BASEPAGENAME}} variable) in the header text. This is typically done in the case of template families which all transclude a documentation subpage from a single family member.
| Markup | {{#parsoid |
|---|---|
| Renders as | This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Example in articles based on its TemplateData.
TemplateData for Example |
Use the |nolink=1 parameter to omit the wikilink from the word "TemplateData" in the header text, for instances when it is already linked elsewhere on the page.
| Markup | {{#parsoid |
|---|---|
| Renders as | This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:TemplateData header in articles based on its TemplateData.
TemplateData for TemplateData header |
Use the |noheader=1 parameter to omit the first sentence of the default header text.
| Markup | {{#parsoid |
|---|---|
| Renders as | See a monthly parameter usage report for Template:TemplateData header in articles based on its TemplateData.
TemplateData for TemplateData header |
Example
Some editors prefer to nest very lengthy TemplateData tables within a collapsible box template. An example of this layout for Template:User would use wikitext that resembled…
{{Collapse|title=TemplateData|content=
{{TemplateData header|User}}
<templatedata>{
"description": "This template is used to create a link to a user's user page (unless using {{Useranon}}), talk page, and contributions, and generates a special notification (aka 'ping').",
"format": "inline",
"paramOrder": [
"1",
"lang",
"project",
"separator"
],
"params": {
"1": {
"label": "User name",
"type": "string",
"required": true,
"description": "The user name that you want to create links to and notify.",
"aliases":["user"]
},
"project": {
"label": "Sister project",
"type": "string",
"description": "Used to link to a sister project instead of the English Wikipedia. Use the standard interwiki prefix."
},
"lang": {
"label": "Other language project",
"type": "string",
"description": "Used to link to another language project. If used with the \"sister project\" parameter, links to another language of a sister project. Otherwise links to another language Wikipedia. Use the standard language code."
},
"separator": {
"label": "Separator",
"description": "Used to change the separator between the links. If unused, defaults to a dot."
}
}
}</templatedata>}}
TemplateData | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:User in articles based on its TemplateData.
TemplateData for User This template is used to create a link to a user's user page (unless using {{Useranon}}), talk page, and contributions, and generates a special notification (aka 'ping').
| |||||||||||||||||||||||||
TemplateData
TemplateData for TemplateData header
Inserts a brief introduction for the TemplateData section of a documentation page and adds the root page to the 'Templates using TemplateData' category
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Template name | 1 | Overrides the name of the template referenced as the source of the information
| Line | optional |
| No header | noheader | Omits the first sentence of the header text | Boolean | optional |
| Unlinked | nolink | Overrides linking the word 'TemplateData' in the header text to the page Wikipedia:TemplateData; useful when such a link already appears earlier on the page | Boolean | optional |
Tracking categories
See also
- {{Crude TemplateData}}
- {{Format TemplateData}}
- {{Template parameter usage}}
- {{TemplateData}}