Template:TemplateData header: Difference between revisions
(fix website link if |1= is used) |
m (1 revision imported: Wikipedia Infoboxes) |
||
(One intermediate revision by the same user not shown) | |||
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> |
Latest revision as of 11:14, 8 July 2024
<languages/>
This is the TemplateData documentation for this template used by VisualEditor and other tools.
TemplateData header
[[Category:Templates using TemplateData{{#translation:}}]]
<translate> Inserts a brief header for the template data section.</translate> <translate> Adds the <tvar name=1>/doc</tvar> subpage to <tvar name=2>Category:TemplateData documentation </tvar> and the template page to <tvar name=3>Category:Templates using TemplateData </tvar>.</translate>
<translate>
Usage
</translate> <syntaxhighlight lang="html">
TemplateData== or ==Parameters== or ==Usage
{{TemplateData header}} Template:^(templatedataTemplate:)^{ ... }Template:^(/templatedataTemplate:)^ </syntaxhighlight>
<translate>
Use {{<tvar name=1>tmpl|0={{TemplateData header|$1}}
</tvar>|Template name}} to display a name for the template other than the default, which is <tvar name="2">{{BASEPAGENAME}} </tvar>.
</translate>
-
This is the TemplateData documentation for this template used by VisualEditor and other tools.
Template name
<translate>
Use <tvar name="1">{{TemplateData header|noheader=1}}
</tvar> to omit the first sentence of the header text.
</translate>
-
TemplateData header
<translate>
Parameters
</translate> Template:TemplateData header/doc