More actions
Created page with "<div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|{{{1|{{BASEPAGENAME}}}}}|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link TD; DEFAULT: -->TemplateData}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by TemplateWizard, VisualEditor and other..." |
No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
<div class="templatedata-header">{{#if:{{{ | <noinclude> | ||
<languages/> | |||
-->{{ | <onlyinclude>{{#switch:<translate></translate> | ||
|= | |||
--> | <div class="templatedata-header"><!-- | ||
-->{{#if:{{yesno|{{{editlinks|}}}}}<!-- | |||
-->|{{#ifexpr:<!-- | |||
-->{{#if:{{{docpage|}}}<!-- | |||
--> | -->|{{#ifeq:{{FULLPAGENAME}}|{{transclude|{{{docpage}}}}}|0|1}}<!-- | ||
-->|not{{IsDocSubpage|false=0}}<!-- | |||
--> | -->}}<!-- | ||
-->|{{Navbar|{{{docpage|{{BASEPAGENAME}}/doc}}}|plain=1|brackets=1|style=float:{{dir|{{PAGELANGUAGE}}|left|right}};}}<!-- | |||
-->}}<!-- | |||
-->}} | -->}} | ||
{{#if:{{{noheader|}}}||<translate><!--T:1--> This is the [[<tvar name=1>Special:MyLanguage/Help:TemplateData</tvar>|TemplateData]] documentation for this template used by [[<tvar name=2>Special:MyLanguage/VisualEditor</tvar>|VisualEditor]] and other tools.</translate>}} | |||
''' | '''{{{1|{{BASEPAGENAME}}}}}''' | ||
</div><includeonly><!-- | </div><includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|<!-- | ||
-->|{{#if:{{IsDocSubpage|false=}}<!-- | |||
-->|[[Category:TemplateData documentation{{#translation:}}]]<!-- | |||
-->|[[Category:Templates using TemplateData{{#translation:}}]]<!-- | |||
-->}}<!-- | |||
-->}}</includeonly> | |||
| #default= | |||
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:TemplateData header|noshift=1|uselang={{#if:{{pagelang}}|{{pagelang}}|{{int:lang}}}}}} | |||
}}</onlyinclude> | |||
{{Documentation|content= | |||
<translate><!--T:3--> Inserts a brief header for the template data section.</translate> | |||
-- | <translate><!--T:4--> Adds the <tvar name=1>/doc</tvar> subpage to <tvar name=2>{{ll|Category:TemplateData documentation}}</tvar> and the template page to <tvar name=3>{{ll|Category:Templates using TemplateData}}</tvar>.</translate> | ||
-->{{template | |||
<translate> | |||
== Usage == <!--T:2--> | |||
</translate> | |||
{{#tag:syntaxhighlight| | |||
==TemplateData== or ==Parameters== or ==Usage== | |||
{{((}}TemplateData header{{))}} | |||
{{^(}}templatedata{{)^}}{ | |||
... | |||
}{{^(}}/templatedata{{)^}} | |||
|lang=html | |||
}} | |||
-->< | <translate> | ||
<!--T:5--> | |||
Use {{<tvar name=1>tmpl|0=<code>{{((}}TemplateData header{{!}}$1{{))}}</code></tvar>|Template name}} to display a name for the template other than the default, which is <tvar name="2">{{ll|Help:Magic words#Variables|<nowiki>{{BASEPAGENAME}}</nowiki>}}</tvar>. | |||
</translate> | |||
<dl><dd> | |||
{{TemplateData header|Template name}} | |||
</dd></dl> | |||
<translate> | |||
<!--T:6--> | |||
Use <tvar name="1"><code><nowiki>{{TemplateData header|noheader=1}}</nowiki></code></tvar> to omit the first sentence of the header text. | |||
</translate> | |||
<dl><dd> | |||
{{TemplateData header|noheader=1}} | |||
</dd></dl> | |||
<translate> | |||
==Parameters== <!--T:7--> | |||
</translate> | |||
{{TemplateData header/doc}} | |||
}} | |||
</noinclude> |
Revision as of 02:58, 14 February 2025
This is the TemplateData documentation for this template used by VisualEditor and other tools.
TemplateData header
Inserts a brief header for the template data section. Adds the /doc subpage to Template:Ll and the template page to Template:Ll.
Usage
==TemplateData== or ==Parameters== or ==Usage==
{{TemplateData header}}
[[:Template:^(]]templatedata[[:Template:)^]]{
...
}[[:Template:^(]]/templatedata[[:Template:)^]]
Use Template:Tmpl to display a name for the template other than the default, which is Template:Ll.
- Script error: No such module "Template translation".
Use {{TemplateData header|noheader=1}}
to omit the first sentence of the header text.
- Script error: No such module "Template translation".
Parameters
This template uses Lua: |
The {{TemplateData header}}
template inserts a brief header for the template data section, and adds the page to Category:Templates using TemplateData.
Usage
==TemplateData== {{TemplateData header}} <templatedata>{ ... }</templatedata> Note: Section headers of ==Parameters== or ==Usage== may also be used.
Use {{TemplateData header|Template name}}
to display a name for the template other than the default, which is {{BASEPAGENAME}}. Do not add Template:
.
Script error: No such module "Template translation".
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.
Script error: No such module "Template translation".
Use {{TemplateData header|noheader=1}}
to omit the first sentence of the header text.
Script error: No such module "Template translation".
Example
- Using a collapse box for
[[Template:User]]
:
{{collapse top|title=TemplateData}} {{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').", "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> {{collapse bottom}}
TemplateData
| |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Script error: No such module "Template translation". 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').
|
Parameters
Script error: No such module "Template translation".
Inserts a brief header for the TemplateData 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 |
Tracking categories
- Category:Pages using TemplateData header with unknown parameters (5)
- Category:Templates using TemplateData (807)
See also
- {{Crude TemplateData}}
- {{Format TemplateData}}
- {{Template parameter usage}}
- {{TemplateData}}