[[w:]]>CrafterNova added shortcut |
m 1 revision imported |
(No difference)
|
Latest revision as of 12:58, 25 June 2022
This is a documentation subpage for Template:Distinguish. It contains usage information, categories and other content that is not part of the original Template page. |
[[Category:Template documentation pages{{#translation:}}]]
This template is used on approximately 87,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
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 (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"):
<templatestyles src="Template:Mono/styles.css"/>{{distinguish|Foo}} → <templatestyles src="Hatnote/styles.css"/>
This hatnote can be used to distinguish the topic from multiple other topics:
<templatestyles src="Template:Mono/styles.css"/>{{distinguish|Foo|Bar}} → <templatestyles src="Hatnote/styles.css"/>
<templatestyles src="Template:Mono/styles.css"/>{{distinguish|Foo|Bar|Baz}} → <templatestyles src="Hatnote/styles.css"/>
It can also be used to customize the text that will appear. You may do this using the template's <templatestyles src="Template:Nowrap/styles.css"/>|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:
<templatestyles src="Template:Mono/styles.css"/>{{distinguish|text = the Martian moon [[Phobos (moon)|Phobos]], or Phoebus, an epithet of the Greek god [[Apollo]]}} → <templatestyles src="Hatnote/styles.css"/>
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 the target is a disambiguation page, display of the parentheses may be avoided by escaping the vertical bar using the magic word {{!}}:
<templatestyles src="Template:Mono/styles.css"/>{{distinguish|Crossfire (disambiguation){{!}}Crossfire}} → <templatestyles src="Hatnote/styles.css"/>
The escape is necessary, otherwise the template will read the next text as another topic:
<templatestyles src="Template:Mono/styles.css"/>{{distinguish|Crossfire (disambiguation)|Crossfire}} → <templatestyles src="Hatnote/styles.css"/>
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
- <templatestyles src="Hatnote/styles.css"/><translate> Not to be confused with</translate> comma.
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, <templatestyles src="Template:Mono/styles.css"/>{{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:
- Reversi
- <templatestyles src="Hatnote/styles.css"/><translate> Not to be confused with</translate> Reversis.
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 <templatestyles src="Template:Mono/styles.css"/>{{about}} instead of <templatestyles src="Template:Nowrap/styles.css"/>{{distinguish}}
. The difference is to provide explanation upfront without requiring the reader to click through and differentiate the terms on their own.
<templatestyles src="Template:Nowrap/styles.css"/>{{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.
Distinguish
[[Category:TemplateData documentation{{#translation:}}]]
<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\" 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.", "paramOrder": [ "1", "2", "3", "4",
"text", "selfref"
], "format": "inline" } </templatedata>
Redirects
- {{Confused}}
- {{Confuse}}
- {{Misspelling}}
- {{Nottobeconfusedwith}}
- {{Ntbcw}}
See also
- {{About}}
- {{Category distinguish}}
- {{For}}
- {{Redirect}}
- {{R from misspelling}}