Template:TemplateData header/doc: Difference between revisions
meta>Good Olfactory Templates using TemplateData |
Update template documentation to reflect code changes |
||
| (10 intermediate revisions by 3 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}} | | {{TemplateData header|Template name}} | ||
|} | |} | ||
Use | 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}} | | {{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> | ||
<includeonly>{{ | == See also == | ||
<!-- | * {{Template link general|Crude TemplateData}} | ||
[[Category: | * {{Category link with count|Category:Templates using TemplateData}} | ||
<includeonly>{{Sandbox other||<!-- Please place category links below this line. Thank you. --> | |||
[[Category:TemplateData|Header template]] | |||
}}</includeonly> | }}</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