Template:Distinguish
<languages/>
#if: |, [[:{{{2}}}{{#if:||{{{l2}}}}}]], {{ #if: | [[:{{{3}}}{{#if:||{{{l3}}}}}]], <translate> or</translate> [[:{{{4}}}{{#if:||{{{l4}}}}}]] |<translate> or</translate> [[:{{{3}}}{{#if:||{{{l3}}}}}]] }} | {{ #if: |<translate> or</translate> [[:{{{2}}}{{#if:||{{{l2}}}}}]] }}}}.
Lua error: Module:TNT:172: '''Missing JsonConfig extension, or not properly configured; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Documentation.tab. See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates'''.{{#if:<translate>
Usage
<tvar name=1>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Distinguish|Distinguish]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}</tvar> is used to create hatnotes to warn about possible confusion with a small number of other, related, titles at the top of article sections according to Wikipedia:Layout.
It is not for use in the "See also" section at the bottom of an article. </translate>
{{#if:{{safesubst:#switch: |no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Distinguish|Distinguish]]{{#if:<translate> Article 1</translate>||<translate> Article 1</translate>}}{{#if:...||...}}{{#if:<translate> Article 4</translate>||<translate> Article 4</translate>}}{{#if:label 1=<translate> label1</translate>||label 1=<translate> label1</translate>}}{{#if:...||...}}{{#if:label 4=<translate> label4</translate>||label 4=<translate> label4</translate>}}{{#if:||...}}}}
<translate>
- One to four articles can be listed.</translate>
<translate>
- The word "or" is always placed between the final two entries when displayed.</translate>
<translate>
- If more than 4 entries are supplied, a message will be displayed pointing out the problem.</translate>
<translate>
- You can use parameters label 1 to label 4 to specify alternative labels for the links.
</translate>
- <translate> Adding newline characters will break article links.</translate>
<translate>
Examples
</translate>
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Distinguish|Distinguish]]{{#if:article1||article1}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}
#if: |, [[:{{{2}}}{{#if:||{{{l2}}}}}]], {{ #if: | [[:{{{3}}}{{#if:||{{{l3}}}}}]], <translate> or</translate> [[:{{{4}}}{{#if:||{{{l4}}}}}]] |<translate> or</translate> [[:{{{3}}}{{#if:||{{{l3}}}}}]] }} | {{ #if: |<translate> or</translate> [[:{{{2}}}{{#if:||{{{l2}}}}}]] }}}}.
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Distinguish|Distinguish]]{{#if:article1||article1}}{{#if:article2||article2}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}
#if: |, [[:article2{{#if:||{{{l2}}}}}]], {{ #if: | [[:{{{3}}}{{#if:||{{{l3}}}}}]], <translate> or</translate> [[:{{{4}}}{{#if:||{{{l4}}}}}]] |<translate> or</translate> [[:{{{3}}}{{#if:||{{{l3}}}}}]] }} | {{ #if: article2 |<translate> or</translate> [[:article2{{#if:||{{{l2}}}}}]] }}}}.
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Distinguish|Distinguish]]{{#if:article1||article1}}{{#if:article2||article2}}{{#if:article3||article3}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}
#if: article3 |, [[:article2{{#if:||{{{l2}}}}}]], {{ #if: | [[:article3{{#if:||{{{l3}}}}}]], <translate> or</translate> [[:{{{4}}}{{#if:||{{{l4}}}}}]] |<translate> or</translate> [[:article3{{#if:||{{{l3}}}}}]] }} | {{ #if: article2 |<translate> or</translate> [[:article2{{#if:||{{{l2}}}}}]] }}}}.
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Distinguish|Distinguish]]{{#if:article1||article1}}{{#if:article2||article2}}{{#if:article3||article3}}{{#if:article4||article4}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}
#if: article3article4 |, [[:article2{{#if:||{{{l2}}}}}]], {{ #if: article4 | [[:article3{{#if:||{{{l3}}}}}]], <translate> or</translate> [[:article4{{#if:||{{{l4}}}}}]] |<translate> or</translate> [[:article3{{#if:||{{{l3}}}}}]] }} | {{ #if: article2 |<translate> or</translate> [[:article2{{#if:||{{{l2}}}}}]] }}}}.
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Distinguish|Distinguish]]{{#if:article1||article1}}{{#if:label 1=label1||label 1=label1}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}
#if: |, [[:{{{2}}}{{#if:||{{{l2}}}}}]], {{ #if: | [[:{{{3}}}{{#if:||{{{l3}}}}}]], <translate> or</translate> [[:{{{4}}}{{#if:||{{{l4}}}}}]] |<translate> or</translate> [[:{{{3}}}{{#if:||{{{l3}}}}}]] }} | {{ #if: |<translate> or</translate> [[:{{{2}}}{{#if:||{{{l2}}}}}]] }}}}.
- {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|Page Template:Nowrap/styles.css has no content.}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Distinguish|Distinguish]]{{#if:article1||article1}}{{#if:article2||article2}}{{#if:label 1=label1||label 1=label1}}{{#if:||}}{{#if:label 2=label2||label 2=label2}}{{#if:||{{{7}}}}}{{#if:||...}}}}
#if: |, [[:article2{{#if:label2||label2}}]], {{ #if: | [[:{{{3}}}{{#if:||{{{l3}}}}}]], <translate> or</translate> [[:{{{4}}}{{#if:||{{{l4}}}}}]] |<translate> or</translate> [[:{{{3}}}{{#if:||{{{l3}}}}}]] }} | {{ #if: article2 |<translate> or</translate> [[:article2{{#if:label2||label2}}]] }}}}.
TemplateData
{{#switch:<translate></translate> | = {{#if:{{#ifexpr: ( {{#ifeq:distinguish|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:distinguish|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}
|
{{#ifeq:show |show
| Template:Mbox }}{{#if: | | {{#ifexist:Template:Distinguish | [[Category:{{#switch:Template | Template | Project = Template | Module = Module | User = User | #default = MediaWiki }} documentation pages{{#translation:}}]] | [[Category:Documentation subpages without corresponding pages{{#translation:}}]] }} }} | }}
| #default=
{{#switch:
| = {{#if:{{#ifexpr: ( {{#ifeq:distinguish|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:distinguish|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}
|
{{#ifeq:show |show
| Template:Mbox }}{{#if: | | {{#ifexist:Template:Distinguish | [[Category:{{#switch:Template | Template | Project = Template | Module = Module | User = User | #default = MediaWiki }} documentation pages{{#translation:}}]] | [[Category:Documentation subpages without corresponding pages{{#translation:}}]] }} }} | }}
| #default=
Lua error: expandTemplate: template loop detected.
}} }} {{#switch:<translate></translate> |=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:Distinguish/doc|{{#ifeq:Template:Distinguish|{{#switch:
|#default = Distinguish/doc | = {{#ifeq: | | Template:Distinguish/doc | Distinguish/doc }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:distinguish|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:distinguish|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = Distinguish/doc | = {{#ifeq: | | Template:Distinguish/doc | Distinguish/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 = Distinguish/doc | = {{#ifeq: | | Template:Distinguish/doc | Distinguish/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>}}
Distinguish
{{#ifeq:Distinguish|sandbox||{{#if:{{#ifexpr: (
{{#ifeq:distinguish|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:distinguish|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
{{#switch:
|=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:Distinguish/doc|{{#ifeq:Template:Distinguish|{{#switch:
|#default = Distinguish/doc | = {{#ifeq: | | Template:Distinguish/doc | Distinguish/doc }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:distinguish|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:distinguish|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = Distinguish/doc | = {{#ifeq: | | Template:Distinguish/doc | Distinguish/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 = Distinguish/doc | = {{#ifeq: | | Template:Distinguish/doc | Distinguish/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.}}
Distinguish
{{#ifeq:Distinguish|sandbox||{{#if:{{#ifexpr: (
{{#ifeq:distinguish|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:distinguish|-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.
}} }} <templatedata> { "description": { "en": "Adds warning \"Not to be confused\" on the reader's page, with a short list of related pages.", "cs": "Přidává upozornění \"Aby nedošlo k záměně\" na stránku čtenáře s krátkým seznamem souvisejících stránek.", "fr": "Ajoute un avertissement \"A ne pas confondre avec\" sur la page du lecteur, avec une liste courte de pages associées." }, "format": "inline", "params": { "1": { "label": { "en": "Page 1", "cs": "Stránka 1" }, "description": { "en": "Full name of related page", "cs": "Celý název související stránky", "fr": "Nom complet de la page relative à laquelle vous voulez faire référence." }, "example": { "cs": "Article_old Article/doc Special:MyLanguage/Articles", "fr": "Article_old Article/doc Special:MyLanguage/Articles" }, "required": true, "type": "wiki-page-name" }, "2": { "label": { "en": "Page 2", "cs": "Stránka 2" }, "description": { "en": "Full name of related page", "cs": "Celý název související stránky", "fr": "Nom complet de la page relative à laquelle vous voulez faire référence." }, "type": "wiki-page-name" }, "3": { "label": { "en": "Page 3", "cs": "Stránka 3" }, "description": { "en": "Full name of related page", "cs": "Celý název související stránky", "fr": "Nom complet de la page relative à laquelle vous voulez faire référence." }, "type": "wiki-page-name" }, "4": { "label": { "en": "Page 4", "cs": "Stránka 4" }, "description": { "en": "Full name of related page", "cs": "Celý název související stránky", "fr": "Nom complet de la page relative à laquelle vous voulez faire référence." }, "type": "wiki-page-name" }, "l1": { "aliases": [ "label 1" ], "label": { "en": "Label 1", "cs": "Štítek 1" }, "description": { "en": "Custom label for the link, instead of the page name.", "cs": "Vlastní štítek pro odkaz místo názvu stránky.", "fr": "Texte alternatif affiché pour remplacer le nom de la page relative. " }, "example": { "fr": "Archives Documentation Actualités" }, "default": { "en": "Page name", "cs": "Název stránky", "fr": "Copie de Nom de page" }, "type": "line" }, "l2": { "aliases": [ "label 2" ], "label": { "en": "Label 2", "cs": "Štítek 2" }, "description": { "en": "Custom label for the link, instead of the page name.", "cs": "Vlastní štítek pro odkaz místo názvu stránky.", "fr": "Texte alternatif affiché pour remplacer le nom de la page relative. " }, "default": { "en": "Page name", "cs": "Název stránky", "fr": "Copie de Nom de page" }, "type": "line" }, "l3": { "aliases": [ "label 3" ], "label": { "en": "Label 3", "cs": "Štítek 3" }, "description": { "en": "Custom label for the link, instead of the page name.", "cs": "Vlastní štítek pro odkaz místo názvu stránky.", "fr": "Texte alternatif affiché pour remplacer le nom de la page relative. " }, "default": { "en": "Page name", "cs": "Název stránky", "fr": "Copie de Nom de page" }, "type": "line" }, "l4": { "aliases": [ "label 4" ], "label": { "en": "Label 4", "cs": "Štítek 4" }, "description": { "en": "Custom label for the link, instead of the page name.", "cs": "Vlastní štítek pro odkaz místo názvu stránky.", "fr": "Texte alternatif affiché pour remplacer le nom de la page relative. " }, "default": { "en": "Page name", "cs": "Název stránky", "fr": "Copie de Nom de page" }, "type": "line" } }, "paramOrder": [ "1", "l1", "2", "l2", "3", "l3", "4", "l4" ] } </templatedata> {{#switch:Distinguish|sandbox|doc=|#default= [[Category:Hatnote templates{{#translation:}}]] }}| [[Category:Template documentation pages{{#translation:}}]] }}