Template:TemplateData header/doc: Difference between revisions
meta>Zyxw update to match renaming of template in May 2015 |
Update template documentation to reflect code changes |
||
| (13 intermediate revisions by 6 users not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}}<!-- Please place category links at the bottom of this page where indicated. Thank you. --> | ||
<!-- | The {{Template link general|plaincode=on|TemplateData header}} template inserts a brief header for the TemplateData section of template documentation, and adds the transcluding page to [[:Category:Templates using TemplateData]]. | ||
== Usage == | == Usage == | ||
<pre> | <pre style="margin-left: 3em; overflow: auto; width: 33vw;"> | ||
==TemplateData== or ==Parameters== or ==Usage== | == TemplateData == or == Parameters == or == Usage == | ||
{{TemplateData header}} | {{TemplateData header}} | ||
<templatedata>{ | |||
… | |||
} | }</templatedata> | ||
</pre> | </pre> | ||
Use < | Use {{Code|<nowiki>{{TemplateData header|Template name}}</nowiki>}} to display a name for the template other than the default, which is [[wikipedia:Help:Magic words#Variables|<nowiki>{{BASEPAGENAME}}</nowiki>]]. | ||
: {| | |||
| {{TemplateData header|Template name}} | |||
|} | |||
Use {{Code|<nowiki>{{TemplateData header|nolink=1}}</nowiki>}} to omit the [[wikipedia: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}} | |||
|} | |||
==Parameters== | == Parameters == | ||
{{TemplateData header}} | {{TemplateData header}} | ||
<templatedata>{ | <templatedata>{ | ||
"description": "Inserts a brief header for the TemplateData section of template documentation, and adds the page to Category:Templates using TemplateData", | |||
"format": "inline", | |||
"paramOrder": [ | |||
"1", | |||
"nolink" | |||
], | |||
"params": { | |||
"1": { | |||
"label": "Template name", | |||
"description": "Used to display a name for the template other than the default of {{BASEPAGENAME}}", | |||
"example": "Some other template", | |||
"type": "wiki-template-name", | |||
"default": "{{BASEPAGENAME}}" | |||
}, | |||
"nolink": { | |||
"label": "Disable link", | |||
"description": "Omits the wikilink from the word 'TemplateData' in the header text when assigned any value; for instances where it is already linked outside this template.", | |||
"example": "on", | |||
"type": "line", | |||
"suggestedvalues": [ | |||
"true", | |||
"on", | |||
"yes", | |||
"y", | |||
"1" | |||
] | |||
} | |||
} | |||
}</templatedata> | }</templatedata> | ||
==See also== | == See also == | ||
* {{Template link general|Crude TemplateData}} | |||
* {{Category link with count|Category:Templates using TemplateData}} | |||
<includeonly> | <includeonly>{{Sandbox other||<!-- Please place category links below this line. Thank you. --> | ||
<!-- | |||
</includeonly> | [[Category:TemplateData|Header template]] | ||
}}</includeonly> | |||
Latest revision as of 16:18, 25 November 2024
| 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. |
The {{TemplateData header}} template inserts a brief header for the TemplateData section of template documentation, and adds the transcluding 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.
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.
TemplateData for TemplateData header
Parameters
TemplateData for TemplateData header
Inserts a brief header for the TemplateData section of template documentation, and 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 of {{BASEPAGENAME}}
| Template | optional |
| Disable link | nolink | Omits the wikilink from the word 'TemplateData' in the header text when assigned any value; for instances where it is already linked outside this template.
| Line | optional |
See also