Template:Distinguish/doc: Difference between revisions
m (→When to use: Made capitalization match article title in a reference to the article itself, not within body text. This matches the other links throughout and earlier versions as well.) |
m (1 revision imported) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
− | {{tsh|dist}} |
+ | {{tsh|dist|ntbcw|confuse}} |
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) --> |
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) --> |
||
{{High-use| 65005 }} |
{{High-use| 65005 }} |
||
Line 11: | Line 11: | ||
== Usage == |
== Usage == |
||
− | Here is an example of its standard usage |
+ | Here is an example of its standard usage on the article about the mathematical [[Astroid]]: |
− | {{tlx|distinguish| |
+ | {{tlx|distinguish|Asteroid}} → {{Distinguish|Asteroid}} |
− | This hatnote can be used to distinguish the topic from multiple other topics: |
+ | This hatnote can be used to distinguish the topic from multiple other topics, as for [[Corundum]] or [[Bangala language]]: |
− | {{tlx|distinguish| |
+ | {{tlx|distinguish|Carborundum|Conundrum}} → {{Distinguish|Carborundum|Conundrum}} |
− | {{tlx|distinguish| |
+ | {{tlx|distinguish|Bangla language|Mbangala language|Ngala language}} → {{Distinguish|Bangla language|Mbangala language|Ngala language}} |
+ | 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, the article "Apollo" is linked to directly and a short explanation fills in the necessary context: |
||
− | 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 {{=}} |
+ | {{tlx|distinguish|text {{=}} Phoebus, an epithet of the Greek god [[Apollo]]}} → {{Distinguish|text = 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 <code><nowiki>...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 <code><nowiki>...an [[epithet]] of the [[Greek]] god [[Apollo]].</nowiki></code> |
− | |||
− | 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 the target is a disambiguation page, display of the parentheses may be avoided by escaping the vertical bar using the [[Help:Magic words|magic word]] {{Tl|!}}: |
When the target is a disambiguation page, display of the parentheses may be avoided by escaping the vertical bar using the [[Help:Magic words|magic word]] {{Tl|!}}: |
||
Line 115: | Line 113: | ||
{{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 templates]] |
+ | [[Category:Disambiguation and redirection hatnote templates]] |
− | [[Category:Hatnote templates]] |
||
}}</includeonly> |
}}</includeonly> |
Latest revision as of 20:42, 26 September 2024
File:Edit-copy green.svg | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original template page. |
Warning | This template is used on approximately 109,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
File:Lua-Logo.svg | This template uses Lua: |
Description
The "distinguish" template produces a hatnote to point out to our readers the existence of one or more articles whose title(s) is, or 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 on the article about the mathematical Astroid:
{{distinguish|Asteroid}}
→
This hatnote can be used to distinguish the topic from multiple other topics, as for Corundum or Bangala language:
{{distinguish|Carborundum|Conundrum}}
→
{{distinguish|Bangla language|Mbangala language|Ngala language}}
→
The |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, the article "Apollo" is linked to directly and a short explanation fills in the necessary context:
{{distinguish|text = 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]].
When the target is a disambiguation page, display of the parentheses may be avoided by escaping the vertical bar using the magic word {{!}}:
check{{distinguish|Crossfire (disambiguation){{!}}Crossfire}}
→
The escape is necessary, otherwise the template will read the next text as another topic:
☒{{distinguish|Crossfire (disambiguation)|Crossfire}}
→
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:
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:
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 explanation upfront without requiring the reader to click through and differentiate the terms on their own.
{{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 for Distinguish
A hatnote used when there is an ambiguity in an article's title.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Name of article | 1 | Name of article that you want to link to | Page name | suggested |
Optional additional article to link (2) | 2 | Optional additional article to link | Page name | optional |
Optional additional article to link (3) | 3 | Optional additional article to link | Page name | optional |
Optional additional article to link (4) | 4 | Optional additional article to link | Page name | optional |
Custom text | text | Custom message in wikitext; e.g. "[[foo]] and [[Bar (computer science)|bar]]" produces "Not to be confused with [[foo]] and [[Bar (computer science)|bar]]." | String | optional |
Self reference | selfref | If set, marks note as being a self reference, to not be shown when content is reused | Boolean | optional |
Redirects
- {{Confused}}
- {{Confuse}}
- {{Misspelling}}
- {{Nottobeconfusedwith}}
- {{Ntbcw}}
See also
- {{About}}
- {{Category distinguish}}
- {{For}}
- {{Redirect}}
- {{R from misspelling}}