Template:TemplateData header: Difference between revisions
m (12 revisions imported from w:en:Template:TemplateData_header) |
Tag: Undo |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1:
<div class="templatedata-header">{{#if:{{{noheader|}}}| |This is the [[Wikipedia:TemplateData|TemplateData]] documentation for this template used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools.}}▼
<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}};}}<!--
-->}}<!--
-->}}
▲
'''{{{1|{{BASEPAGENAME}}}}}'''
</div><includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|
-->|{{#if:{{IsDocSubpage|false=}}<!--
-->|[[Category:TemplateData documentation{{#translation:}}]]<!--
▲}}</includeonly><noinclude>
-->|[[Category:Templates using TemplateData{{#translation:}}]]<!--
{{Documentation}}▼
-->}}<!--
-->}}</includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:TemplateData header|noshift=1|uselang={{#if:{{pagelang}}|{{pagelang}}|{{int:lang}}}}}}
}}</onlyinclude>
Inserts a brief header for the template data section. Adds the /doc subpage to [[:Category:TemplateData documentation{{#translation:}}]] and the template page to [[:Category:Templates using TemplateData{{#translation:}}]].
== Usage ==
{{#tag:syntaxhighlight|
==TemplateData== or ==Parameters== or ==Usage==
{{((}}TemplateData header{{))}}
{{^(}}templatedata{{)^}}{
...
}{{^(}}/templatedata{{)^}}
|lang=html
}}
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>]].
<dl><dd>
{{TemplateData header|Template name}}
</dd></dl>
Use <code><nowiki>{{TemplateData header|noheader=1}}</nowiki></code> to omit the first sentence of the header text.
<dl><dd>
{{TemplateData header|noheader=1}}
</dd></dl>
==Parameters==
{{TemplateData header/doc}}
}}
</noinclude>
|
Latest revision as of 21:55, 5 July 2022
<languages/> Lua error: expandTemplate: template loop detected.
Inserts a brief header for the template data section. Adds the /doc subpage to [[:Category:TemplateData documentation{{#translation:}}]] and the template page to [[:Category:Templates using TemplateData{{#translation:}}]].
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}}.
- Lua error: expandTemplate: template loop detected.
Use {{TemplateData header|noheader=1}}
to omit the first sentence of the header text.
- Lua error: expandTemplate: template loop detected.
Parameters
Inserts a brief header for the template data section.
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 header | noheader | Assigning any value to this parameter will cause the template to omit the first sentence of the header text. | String | optional |
Edit Links? | editlinks | Whether to show {{Navbar}} editlinks on pages that transclude the TemplateData
| Boolean | optional |
Doc Page | docpage | The name of the current page, used for {{Navbar}} edit links
| Template | suggested |
[[Category:Template documentation pages{{#translation:}}]]