Template:TemplateData header: Difference between revisions
Marked this version for translation |
m 1 revision imported |
||
(No difference)
|
Latest revision as of 05:59, 16 January 2024
<languages/> {{#switch:<translate></translate> |=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||<translate> 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>}}
TemplateData header
| #default=
{{#switch:
|=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||This is the TemplateData documentation for this template used by VisualEditor and other tools.}}
TemplateData header
{{#ifeq:TemplateData header|sandbox||{{#if:{{#ifexpr: (
{{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Lua error: expandTemplate: template loop detected.
}} }}
<translate> Inserts a brief header for the template data section.</translate> <translate> Adds the <tvar name=1>/doc</tvar> subpage to <tvar name=2>Template:Ll</tvar> and the template page to <tvar name=3>Template:Ll</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">Template:Ll</tvar>.
</translate>
-
{{#switch:<translate></translate>
|=
{{#if:{{safesubst:#switch:{{#ifeq:TemplateData header|sandbox||{{#if:{{#ifexpr: (
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||<translate> 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>}}
Template name
{{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
{{#switch:
|=
{{#if:{{safesubst:#switch:{{#ifeq:TemplateData header|sandbox||{{#if:{{#ifexpr: (|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||This is the TemplateData documentation for this template used by VisualEditor and other tools.}}
Template name
{{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Lua error: expandTemplate: template loop detected.
}} }}
<translate>
Use <tvar name="1">{{TemplateData header|noheader=1}}
</tvar> to omit the first sentence of the header text.
</translate>
-
{{#switch:<translate></translate>
|=
{{#if:{{safesubst:#switch:{{#ifeq:TemplateData header|sandbox||{{#if:{{#ifexpr: (
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:1||<translate> 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>}}
TemplateData header
{{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
{{#switch:
|=
{{#if:{{safesubst:#switch:{{#ifeq:TemplateData header|sandbox||{{#if:{{#ifexpr: (|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:1||This is the TemplateData documentation for this template used by VisualEditor and other tools.}}
TemplateData header
{{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Lua error: expandTemplate: template loop detected.
}} }}
<translate>
Parameters
</translate> Template:TemplateData header/doc
{{#if:<translate> Inserts a brief header for the template data section.</translate>
<translate> Adds the <tvar name=1>/doc</tvar> subpage to <tvar name=2>Template:Ll</tvar> and the template page to <tvar name=3>Template:Ll</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">Template:Ll</tvar>.
</translate>
-
{{#switch:<translate></translate>
|=
{{#if:{{safesubst:#switch:{{#ifeq:TemplateData header|sandbox||{{#if:{{#ifexpr: (
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||<translate> 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>}}
Template name
{{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
{{#switch:
|=
{{#if:{{safesubst:#switch:{{#ifeq:TemplateData header|sandbox||{{#if:{{#ifexpr: (|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||This is the TemplateData documentation for this template used by VisualEditor and other tools.}}
Template name
{{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Lua error: expandTemplate: template loop detected.
}} }}
<translate>
Use <tvar name="1">{{TemplateData header|noheader=1}}
</tvar> to omit the first sentence of the header text.
</translate>
-
{{#switch:<translate></translate>
|=
{{#if:{{safesubst:#switch:{{#ifeq:TemplateData header|sandbox||{{#if:{{#ifexpr: (
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:1||<translate> 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>}}
TemplateData header
{{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
{{#switch:
|=
{{#if:{{safesubst:#switch:{{#ifeq:TemplateData header|sandbox||{{#if:{{#ifexpr: (|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:TemplateData header|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = TemplateData header/doc | = {{#ifeq: | | Template:TemplateData header/doc | TemplateData header/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:1||This is the TemplateData documentation for this template used by VisualEditor and other tools.}}
TemplateData header
{{#ifeq:templatedata header|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:templatedata header|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Lua error: expandTemplate: template loop detected.
}} }}
<translate>
Parameters
</translate> Template:TemplateData header/doc| [[Category:Template documentation pages{{#translation:}}]] }}