Template:Distinguish/doc: Difference between revisions

wiki>Mesocyclonic93
m Reverted edit by ~2026-22074-05 (talk) to last version by DB1729
 
Remove unsupported imported template links from documentation
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Redirect-distinguish|Template:Confused|Template:Confused?}}
{{Documentation subpage}}
{{Documentation subpage}}
{{tsh|dist|ntbcw|confuse}}
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata -->
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
{{High-use| 65005 }}
{{High-use| 65005 }}
{{Lua|Module:distinguish}}
{{Lua|Module:distinguish}}


This template produces a [[WP:HAT|hatnote]] to point out to readers, who may have misspelled their desired title, the existence of one or more pages whose title(s) is, or are, similar to the current page. It is used in cases where the distinction between the titles is generally obvious and does not need further explanation.  
This template produces a hatnote to point out to readers, who may have misspelled their desired title, the existence of one or more pages whose title(s) is, or are, similar to the current page. It is used in cases where the distinction between the titles is generally obvious and does not need further explanation.  


For cases where an explanation is required, please use the templates {{tl|For}} and {{tl|About}}. For use on category pages, the corresponding template is {{Tl|Category distinguish}}.
For cases where an explanation is required, please use the templates {{tl|For}} and {{tl|About}}. For use on category pages, the corresponding template is <code>Template:Category distinguish</code>.


== Usage ==
== Usage ==
Line 18: Line 16:
:{{demo-inline|<nowiki>{{distinguish|Bangla language|Mbangala language|Ngala language}}</nowiki>}}
:{{demo-inline|<nowiki>{{distinguish|Bangla language|Mbangala language|Ngala language}}</nowiki>}}


The {{para|text}} parameter can be used to create customized text, in case context is required. An example is on the article [[Phobos (mythology)]], which  contains a customized hatnote to distinguish it and "[[Phoebus]]" (a redirect of [[Apollo]]). Both links lead to topics about Greek gods, so the [[WP:NCDAB|parenthetical disambiguation]] in "Phobos (mythology)" is insufficient to disambiguate the two. Since it [[WP:HNR|is typically not preferable to link a redirect]] in a hatnote,{{Clarify|reason=What is the relevant guideline? The link doesn't seem to explain. Please quote the guideline here in a footnote if possible.|date=September 2025}} the article "Apollo" is linked to directly and a short explanation fills in the necessary context:
The {{para|text}} parameter can be used to create customized text, in case context is required. An example is on the article [[Phobos (mythology)]], which  contains a customized hatnote to distinguish it and "[[Phoebus]]" (a redirect of [[Apollo]]). Both links lead to topics about Greek gods, so the parenthetical disambiguation in "Phobos (mythology)" is insufficient to disambiguate the two. Since it is typically not preferable to link a redirect in a hatnote,{{Clarify|reason=What is the relevant guideline? The link doesn't seem to explain. Please quote the guideline here in a footnote if possible.|date=September 2025}} the article "Apollo" is linked to directly and a short explanation fills in the necessary context:
:{{demo-inline|<nowiki>{{distinguish|text=Phoebus, an epithet of the Greek god [[Apollo]]}}</nowiki>}}
:{{demo-inline|<nowiki>{{distinguish|text=Phoebus, an epithet of the Greek god [[Apollo]]}}</nowiki>}}


Line 45: Line 43:
: {{hatnote|This article is about the board game. For the card game, see [[Reversis]].}}<!-- Using a custom {{hatnote}} because {{about}} automatically detects the page type so it would replace "article" with "template". -->
: {{hatnote|This article is about the board game. For the card game, see [[Reversis]].}}<!-- Using a custom {{hatnote}} because {{about}} automatically detects the page type so it would replace "article" with "template". -->


{{tlc|Distinguish}} should only be used when the ambiguity exists for a portion of the readership that is sufficient to warrant a hatnote. Care should be taken to [[WP:TRHAT|avoid trivial uses]].
{{tlc|Distinguish}} should only be used when the ambiguity exists for a portion of the readership that is sufficient to warrant a hatnote. Care should be taken to avoid trivial uses.


== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"1": {
"label": "Name of article",
"description": "Name of article that you want to link to",
"type": "wiki-page-name",
                        "suggested": true
},
"2": {
"label": "Optional additional article to link (2)",
"description": "Optional additional article to link",
"type": "wiki-page-name"
},
"3": {
"label": "Optional additional article to link (3)",
"description": "Optional additional article to link",
"type": "wiki-page-name"
},
"4": {
"label": "Optional additional article to link (4)",
"description": "Optional additional article to link",
"type": "wiki-page-name"
},
        "text": {
            "label": "Custom text",
            "description": "Custom message in wikitext; e.g. \"[[foo]] and [[Bar (computer science)|bar]]\" produces \"Not to be confused with [[foo]] and [[Bar (computer science)|bar]].\"",
            "type": "string"
        },
        "selfref": {
            "label": "Self reference",
            "description": "If set, marks note as being a self reference, to not be shown when content is reused",
            "type": "boolean"
        }


},
"description": "A hatnote used when there is an ambiguity in an article's title.",
"paramOrder": [
"1",
"2",
"3",
"4",
                "text",
                "selfref"
],
"format": "inline"
}
</templatedata>


== Redirects ==
== Redirects ==
* {{tl|Confused}}
* <code>Template:Confused</code>
* {{tl|Confuse}}
* <code>Template:Confuse</code>
* {{tl|Misspelling}}
* <code>Template:Misspelling</code>
* {{tl|Nottobeconfusedwith}}
* <code>Template:Nottobeconfusedwith</code>
* {{tl|Ntbcw}}
* <code>Template:Ntbcw</code>


== See also ==
== See also ==
* {{tl|About}}
* {{tl|About}}
* {{tl|Category distinguish}}
* <code>Template:Category distinguish</code>
* {{tl|For}}
* {{tl|For}}
* {{tl|Redirect}}
* <code>Template:Redirect</code>
* {{tl|R from misspelling}}
* <code>Template:R from misspelling</code>


{{Hatnote templates}}
{{Hatnote templates}}
<includeonly>{{sandbox other||
<includeonly>{{sandbox other||
<!-- Add categories below this line, and interwikis at Wikidata -->
<!-- Add categories below this line, and interwikis at Wikidata -->
[[Category:Disambiguation and redirection hatnote templates]]
 
}}</includeonly>
}}</includeonly>