Difference between revisions of "Template:Distinguish/doc"

From blackwiki
Jump to navigation Jump to search
imported>MSGJ
(add more params)
imported>A loose necktie
m
 
(49 intermediate revisions by 32 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
+
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
 +
{{High-use| 65005 }}
 +
{{Lua|Module:distinguish}}
 +
 
 +
== Description ==
 +
The "distinguish" template produces a [[WP:HAT|hatnote]] to point out to our readers the existence of one or more articles whose title(s) is/are similar to the page in question. It is used in cases where the distinction between the titles is generally obvious and does not need further explanation.
 +
 
 +
For those 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}}.
  
 
== Usage ==
 
== Usage ==
<nowiki>{{Distinguish | foo}}</nowiki> {{Distinguish|foo}}
+
Here is an example of its standard usage (used, for purposes of this example, with the placeholder article "Foo"; the following could be placed on a theoretical article named "Foo (song)", or perhaps one named "Fou" or "Fu"):
 +
{{tlx|distinguish|Foo}}        → {{Distinguish|Foo}}
 +
 
 +
 
 +
This hatnote can be used to distinguish the topic from multiple other topics:
 +
{{tlx|distinguish|Foo|Bar}} → {{Distinguish|Foo|Bar}}
 +
{{tlx|distinguish|Foo|Bar|Gaz}} → {{Distinguish|Foo|Bar|Gaz}}
 +
 
 +
 
 +
It can also be used to customize the text that will appear.  You may do this using the template's {{para|text}} parameter. For example, from the Wikipedia article on [[Phobos (mythology)]], an article about a Greek god that is also the name of one of the moons of Mars, and where the word "Phoebus", quite similar to "Phobos", has an altogether different meaning.  Note that for ease of understanding, terms with parenthetical disambiguation should usually be [[WP:pipe|piped]]:
 +
{{tlx|distinguish|text {{=}} the Martian moon &#91;&#91;Phobos (moon)|Phobos]], or Phoebus, an epithet of the Greek god &#91;&#91;Apollo]]}} → {{Distinguish|text = the Martian moon [[Phobos (moon)|Phobos]], or Phoebus, an epithet of the Greek god [[Apollo]] }}
  
<nowiki>{{Distinguish | foo | bar}}</nowiki> {{Distinguish|foo|bar}}
+
Note that a final period is automatically added at the end of the sentence, and that only one blue link is used per disambiguated topic (i.e, do not type <code><nowiki>...an [[epithet]] of the [[Greek]] god [[Apollo]]. </nowiki></code>
  
<nowiki>{{Distinguish | foo | bar | baz}}</nowiki> {{Distinguish|foo|bar|baz}}
+
It may also be appropriate to place a similar hatnote on the article for [[Phobos (moon)]] to distinguish it from the article on [[Phobos (mythology)]] and the article on Apollo, though it is probably unnecessary to place yet another hatnote on the article on [[Apollo]], since most readers searching for "Apollo Phoebus" will get there by simply typing "Apollo" in the Wikipedia search box.
  
This hatnote is generally used when there is an ambiguity that is not necessarily literal, but one that can be reasonably assumed to exist for a portion of the readership substantial enough to warrant a hatnote. When applying it, care should be taken to [[WP:TRHAT|avoid trivial uses]].
+
== When to use ==
 +
This hatnote is generally used when readers have misspelled their desired title, and the error would be apparent by simply displaying the alternative term without further explanation. For example, consider a reader looking for the punctuation mark who instead ends up at [[coma]]:
 +
: [[Coma]]
 +
: {{Distinguish|Comma}}
  
== Redirects ==
+
Readers are presumed to recognize that they actually wanted ''comma'' by merely looking at the spelling, and this case generally requires no further explanation.
* {{tl|Not to be confused with}}
 
* {{tl|Confused}}
 
* {{tl|Confuse}}
 
* {{tl|Misspelling}}
 
  
== See also ==
+
However, {{tlx|distinguish}} is not suitable when the difference is not readily apparent without additional details. Consider a reader looking for a game they believe is named Reversi:
* {{tl|Distinguish2}}, for multiple disambiguation targets or prepending "the".
+
: {{cross}} [[Reversi]]
* {{tl|About}}, if the page title ''does'' (without misspelling) describe the other target (since the user is then aided by a clear statement of how the page's topic differs from the other target's topic).
+
: {{Distinguish|Reversis}}
  
{{Hatnote templates documentation}}
+
In the above hatnote, it is not generally apparent how the suggested Reversis is different from Reversi, which is also a game.
  
 +
In this case you should use {{tlx|about}} instead of {{tlc|distinguish}}. The difference is to provide explanatation upfront without requiring the reader to click through and differentiate the terms on their own.
 +
: {{tick}} [[Reversi]]
 +
: {{About|the board game|the card game|Reversis}}
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
{{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]].
<!-- Categories go below and interwikis go to Wikidata, thank you! -->
 
[[Category:Disambiguation and redirection templates|{{PAGENAME}}]]
 
[[Category:Hatnote templates]]
 
  
}}
+
== TemplateData ==
 +
{{TemplateData header}}
 
<templatedata>
 
<templatedata>
 
{
 
{
Line 37: Line 54:
 
"description": "Name of article that you want to link to",
 
"description": "Name of article that you want to link to",
 
"type": "wiki-page-name",
 
"type": "wiki-page-name",
"required": true
+
                        "suggested": true
 
},
 
},
 
"2": {
 
"2": {
"label": "Optional additional article to link",
+
"label": "Optional additional article to link (2)",
 
"description": "Optional additional article to link",
 
"description": "Optional additional article to link",
 
"type": "wiki-page-name"
 
"type": "wiki-page-name"
 
},
 
},
 
"3": {
 
"3": {
"label": "Optional additional article to link",
+
"label": "Optional additional article to link (3)",
 
"description": "Optional additional article to link",
 
"description": "Optional additional article to link",
 
"type": "wiki-page-name"
 
"type": "wiki-page-name"
 
},
 
},
 
"4": {
 
"4": {
"label": "Optional additional article to link",
+
"label": "Optional additional article to link (4)",
 
"description": "Optional additional article to link",
 
"description": "Optional additional article to link",
 
"type": "wiki-page-name"
 
"type": "wiki-page-name"
}
+
},
 +
        "text": {
 +
            "label": "Custom text",
 +
            "description": "Custom message in wikitext; e.g. \"[[foo]] and [[bar]]\" produces \"Not to be confused with [[foo]] and [[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.",
 
"description": "A hatnote used when there is an ambiguity in an article's title.",
Line 60: Line 88:
 
"2",
 
"2",
 
"3",
 
"3",
"4"
+
"4",
]
+
                "text",
 +
                "selfref"
 +
],
 +
"format": "inline"
 
}
 
}
 
</templatedata>
 
</templatedata>
</includeonly>
+
 
 +
== Redirects ==
 +
* {{tl|Confused}}
 +
* {{tl|Confuse}}
 +
* {{tl|Misspelling}}
 +
 
 +
== See also ==
 +
* {{tl|About}}
 +
* {{tl|Category distinguish}}
 +
* {{tl|For}}
 +
* {{tl|Redirect}}
 +
* {{tl|R from misspelling}}
 +
 
 +
{{Hatnote templates}}
 +
 
 +
<includeonly>{{sandbox other||
 +
<!-- Add categories below this line, and interwikis at Wikidata -->
 +
[[Category:Disambiguation and redirection templates]]
 +
[[Category:Hatnote templates]]
 +
}}</includeonly>

Latest revision as of 08:46, 19 December 2020

Description

The "distinguish" template produces a hatnote to point out to our readers the existence of one or more articles whose title(s) is/are similar to the page in question. It is used in cases where the distinction between the titles is generally obvious and does not need further explanation.

For those cases where an explanation is required, please use the templates {{For}} and {{About}}. For use on category pages, the corresponding template is {{Category distinguish}}.

Usage

Here is an example of its standard usage (used, for purposes of this example, with the placeholder article "Foo"; the following could be placed on a theoretical article named "Foo (song)", or perhaps one named "Fou" or "Fu"):

{{distinguish|Foo}}


This hatnote can be used to distinguish the topic from multiple other topics:

{{distinguish|Foo|Bar}}

{{distinguish|Foo|Bar|Gaz}}


It can also be used to customize the text that will appear. You may do this using the template's |text= parameter. For example, from the Wikipedia article on Phobos (mythology), an article about a Greek god that is also the name of one of the moons of Mars, and where the word "Phoebus", quite similar to "Phobos", has an altogether different meaning. Note that for ease of understanding, terms with parenthetical disambiguation should usually be piped:

{{distinguish|text = the Martian moon [[Phobos (moon)|Phobos]], or Phoebus, an epithet of the Greek god [[Apollo]]}}

Note that a final period is automatically added at the end of the sentence, and that only one blue link is used per disambiguated topic (i.e, do not type ...an [[epithet]] of the [[Greek]] god [[Apollo]].

It may also be appropriate to place a similar hatnote on the article for Phobos (moon) to distinguish it from the article on Phobos (mythology) and the article on Apollo, though it is probably unnecessary to place yet another hatnote on the article on Apollo, since most readers searching for "Apollo Phoebus" will get there by simply typing "Apollo" in the Wikipedia search box.

When to use

This hatnote is generally used when readers have misspelled their desired title, and the error would be apparent by simply displaying the alternative term without further explanation. For example, consider a reader looking for the punctuation mark who instead ends up at coma:

Coma

Readers are presumed to recognize that they actually wanted comma by merely looking at the spelling, and this case generally requires no further explanation.

However, {{distinguish}} is not suitable when the difference is not readily apparent without additional details. Consider a reader looking for a game they believe is named Reversi:

  1. REDIRECT Template:Xmark

Reversi

In the above hatnote, it is not generally apparent how the suggested Reversis is different from Reversi, which is also a game.

In this case you should use {{about}} instead of {{distinguish}}. The difference is to provide explanatation upfront without requiring the reader to click through and differentiate the terms on their own.

☑Y Reversi
Script error: No such module "about".

{{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

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Distinguish

A hatnote used when there is an ambiguity in an article's title.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Name of article1

Name of article that you want to link to

Pagesuggested
Optional additional article to link (2)2

Optional additional article to link

Pageoptional
Optional additional article to link (3)3

Optional additional article to link

Pageoptional
Optional additional article to link (4)4

Optional additional article to link

Pageoptional
Custom texttext

Custom message in wikitext; e.g. "[[foo]] and [[bar]]" produces "Not to be confused with [[foo]] and [[bar]]."

Stringoptional
Self referenceselfref

If set, marks note as being a self reference, to not be shown when content is reused

Booleanoptional

Redirects

See also