Template:TemplateData header/doc: Difference between revisions
meta>Rezonansowy Adding optional headers per Wikipedia:VisualEditor/Feedback/Archive_2013_3#TemplateData ideas |
m 16 revisions imported |
||
(14 intermediate revisions by 6 users not shown) | |||
Line 2: | Line 2: | ||
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | ||
Inserts a brief header for the template data section. Adds the page to [[:Category:TemplateData | Inserts a brief header for the template data section. Adds the page to [[:Category:Templates using TemplateData]]. | ||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
==TemplateData== or ==Parameters== or ==Usage== | ==TemplateData== or ==Parameters== or ==Usage== | ||
{{ | {{TemplateData header}} | ||
<templatedata>{ | <templatedata>{ | ||
... | ... | ||
Line 13: | Line 13: | ||
</pre> | </pre> | ||
Use <code><nowiki>{{ | Use <code><nowiki>{{TemplateData header|Template name}}</nowiki></code> to display a name for the template other than the default, which is [[Help:Magic_words#Variables|<nowiki>{{BASEPAGENAME}}</nowiki>]]. | ||
:{| | |||
|{{TemplateData header|Template name}} | |||
|} | |||
Use <code><nowiki>{{TemplateData header|nolink=1}}</nowiki></code> to omit the [[Help:Link#Wikilinks|wikilink]] from the word "TemplateData" in the header text, for instances where it is already linked outside this template. | |||
:{| | |||
|{{TemplateData header|nolink=1}} | |||
|} | |||
Use <code><nowiki>{{TemplateData header|noheader=1}}</nowiki></code> to omit the first sentence of the header text. | |||
:{| | |||
|{{TemplateData header|noheader=1}} | |||
|} | |||
==Parameters== | ==Parameters== | ||
{{ | {{TemplateData header}} | ||
<templatedata>{ | <templatedata>{ | ||
"description": "Inserts a brief header for the template data section. Adds the page to [[Category:TemplateData | "description": "Inserts a brief header for the template data section. Adds the page to [[Category:Templates using TemplateData]]", | ||
"params": { | "params": { | ||
"1": { | "1": { | ||
"label": "Template name", | "label": "Template name", | ||
"description": " | "description": "Used to display a name for the template other than the default, which is {{BASEPAGENAME}}.", | ||
"type": "string", | |||
"required": false | |||
}, | |||
"nolink": { | |||
"label": "No link", | |||
"description": "Assigning any value to this parameter will omit cause the template to omit the wikilink from the word \"TemplateData\" in the header text, for instances where it is already linked outside this template.", | |||
"type": "string", | |||
"required": false | |||
}, | |||
"noheader": { | |||
"label": "No header", | |||
"description": "Assigning any value to this parameter will cause the template to omit the first sentence of the header text.", | |||
"type": "string", | "type": "string", | ||
"required": false | "required": false | ||
Line 30: | Line 55: | ||
==See also== | ==See also== | ||
* {{clc|Category:Templates using TemplateData}} | |||
<includeonly> | * {{clc|Category:Pages using TemplateData header with unknown parameters}} – Tracking | ||
* {{tl|Template parameter usage}} | |||
* {{tl|Crude TemplateData}} | |||
<includeonly>{{sandbox other|| | |||
<!-- Categories go here, and interwikis go in Wikidata --> | <!-- Categories go here, and interwikis go in Wikidata --> | ||
[[Category:TemplateData|header]] | |||
</includeonly> | }}</includeonly> |
Latest revision as of 05:14, 3 September 2020
This is a documentation subpage for Template:TemplateData header. It may contain usage information, categories and other content that is not part of the original template page. |
Inserts a brief header for the template data section. Adds the page to Category:Templates using TemplateData.
Usage
==TemplateData== or ==Parameters== or ==Usage== {{TemplateData header}} <templatedata>{ ... }</templatedata>
Use {{TemplateData header|Template name}}
to display a name for the template other than the default, which is {{BASEPAGENAME}}.
- This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for this template in articles based on this TemplateData.
TemplateData for Template name
Use {{TemplateData header|nolink=1}}
to omit the wikilink from the word "TemplateData" in the header text, for instances where it is already linked outside this template.
- This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for this template in articles based on this TemplateData.
TemplateData for TemplateData header
Use {{TemplateData header|noheader=1}}
to omit the first sentence of the header text.
- See a monthly parameter usage report for this template in articles based on this TemplateData.
TemplateData for TemplateData header
Parameters
TemplateData for TemplateData header
Inserts a brief header for the template data section. Adds the page to [[Category:Templates using TemplateData]]
Parameter | Description | Type | Status | |
---|---|---|---|---|
Template name | 1 | Used to display a name for the template other than the default, which is {{BASEPAGENAME}}. | String | optional |
No link | nolink | Assigning any value to this parameter will omit cause the template to omit the wikilink from the word "TemplateData" in the header text, for instances where it is already linked outside this template. | String | optional |
No header | noheader | Assigning any value to this parameter will cause the template to omit the first sentence of the header text. | String | optional |