Template:TemplateData header: Difference between revisions
https://en.wikipedia.org/wiki/Template:Infobox>SUM1 Added "based" parameter to other transclusion |
Deauthorized (talk | contribs) m 1 revision imported |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> |
|||
⚫ | |||
<languages/> |
|||
noheader: |
|||
<onlyinclude>{{#switch:<translate></translate> |
|||
-->{{Template parameter usage|based=y}}|<!-- |
|||
|= |
|||
+header: |
|||
⚫ | |||
⚫ | |||
-->{{#if:{{yesno|{{{editlinks|}}}}}<!-- |
|||
+header, nolink TD |
|||
-->|{{#ifexpr:<!-- |
|||
⚫ | |||
+header, +link [[TD]]; DEFAULT: |
|||
-->|{{#ifeq:{{FULLPAGENAME}}|{{transclude|{{{docpage}}}}}|0|1}}<!-- |
|||
-->[[Wikipedia:TemplateData|TemplateData]]}}<!-- |
|||
-->|not{{IsDocSubpage|false=0}}<!-- |
|||
e.o. #if:nolink; DEFAULT: |
|||
⚫ | |||
--> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|based=y}}<!-- |
|||
-->|{{Navbar|{{{docpage|{{BASEPAGENAME}}/doc}}}|plain=1|brackets=1|style=float:{{dir|{{PAGELANGUAGE}}|left|right}};}}<!-- |
|||
e.o. #if:noheader |
|||
-->}}<!-- |
|||
-->}} |
-->}} |
||
{{#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:}}]]<!-- |
|||
⚫ | |||
-->}}<!-- |
|||
⚫ | |||
| #default= |
|||
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:TemplateData header|noshift=1|uselang={{#if:{{pagelang}}|{{pagelang}}|{{int:lang}}}}}} |
|||
}}</onlyinclude> |
|||
{{Documentation|content= |
|||
<translate>Inserts a brief header for the template data section. Adds the /doc subpage to <tvar name="1">[[:Category:TemplateData documentation{{#translation:}}]]</tvar> and the template page to <tvar name="1">[[:Category:Templates using TemplateData{{#translation:}}]]</tvar>.</translate> |
|||
check parameters |
|||
-->{{#invoke:Check for unknown parameters|check |
|||
|unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |
|||
⚫ | |||
|1 |nolink |noheader |
|||
|preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> |
|||
⚫ | |||
-->{{template other|{{sandbox other|| |
|||
⚫ | |||
<translate> |
|||
⚫ | |||
== Usage == |
|||
</translate> |
|||
{{#tag:syntaxhighlight| |
|||
==TemplateData== or ==Parameters== or ==Usage== |
|||
⚫ | |||
{{^(}}templatedata{{)^}}{ |
|||
... |
|||
}{{^(}}/templatedata{{)^}} |
|||
|lang=html |
|||
}} |
|||
<translate>Use <tvar name="1"><code><nowiki>{{TemplateData header|Template name}}</nowiki></code></tvar> to display a name for the template other than the default, which is [[Help:Magic_words#Variables|<nowiki>{{BASEPAGENAME}}</nowiki>]].</translate> |
|||
--><noinclude>{{Documentation}}</noinclude> |
|||
<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 06:24, 5 September 2023
<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. Adds the /doc subpage to <tvar name="1">[[:Category:TemplateData documentation{{#translation:}}]]</tvar> and the template page to <tvar name="1">[[:Category:Templates using TemplateData{{#translation:}}]]</tvar>.</translate>
<translate>
Usage
</translate>
==TemplateData== or ==Parameters== or ==Usage==
{{TemplateData header}}
[[:Template:^(]]templatedata[[:Template:)^]]{
...
}[[:Template:^(]]/templatedata[[:Template:)^]]
<translate>Use <tvar name="1">{{TemplateData header|Template name}}
</tvar> to display a name for the template other than the default, which is {{BASEPAGENAME}}.</translate>
-
This is the TemplateData documentation for this template used by VisualEditor and other tools.
Template name
Use {{TemplateData header|noheader=1}}
to omit the first sentence of the header text.
-
TemplateData header
Parameters
[[Category:Template documentation pages{{#translation:}}]]