Template:Redirect/doc: Difference between revisions
Appearance
en>SWinxy Copy selfref documentation text from Template:For/doc; see that page's edit history for attribution |
Orangestar (talk | contribs) No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
{{tsh|redir}} | {{tsh|redir}} | ||
{{notice|1=Using this template does '''not''' create a redirect. The following pages may have what you are looking for: | {{notice|1=Using this template does '''not''' create a redirect. The following pages may have what you are looking for: | ||
* [[Wikipedia:Redirect]] is the official Wikipedia guideline on redirects. The page focuses on the rules and standards that the Wikipedia community has agreed to [[WP:Common sense|generally]] follow regarding redirects. | * [[Wikipedia:Redirect]] is the official Wikipedia guideline on redirects. The page focuses on the rules and standards that the Wikipedia community has agreed to [[wikipedia:WP:Common sense|generally]] follow regarding redirects. | ||
* [[Help:Redirect]] is a how-to page that focuses on the technical aspects of redirects. It instructs editors on how redirects work and how to handle them without causing errors. | * [[Help:Redirect]] is a how-to page that focuses on the technical aspects of redirects. It instructs editors on how redirects work and how to handle them without causing errors. | ||
* [[Template:R template index|R template index]] contains a large list of templates that are used in order to tag and categorize redirects. | * [[Template:R template index|R template index]] contains a large list of templates that are used in order to tag and categorize redirects. | ||
| Line 11: | Line 11: | ||
==Description and use== | ==Description and use== | ||
This template produces a [[Wikipedia:Hatnote|hatnote]]: | This template produces a [[wikipedia:Wikipedia:Hatnote|hatnote]]: | ||
* {{tlx|Redirect|Foo}} → {{Redirect|Foo}} | * {{tlx|Redirect|Foo}} → {{Redirect|wikipedia:Foo}} | ||
It is placed at the top of the article or section that is [[WP:PRIMARYREDIRECT|the primary topic of a redirect]], and links to other topics that are ambiguous with the name of that redirect. This template is used instead of the generic {{tl|for}} in order to reduce reader confusion. | It is placed at the top of the article or section that is [[wikipedia:WP:PRIMARYREDIRECT|the primary topic of a redirect]], and links to other topics that are ambiguous with the name of that redirect. This template is used instead of the generic {{tl|for}} in order to reduce reader confusion. | ||
An example would be when a user searches for the emperor [[Achilleus (emperor)|Achilleus]]. However, the search term "Achilleus" redirects to the page titled [[Achilles]] (as in the mythical hero) because it is considered more likely the user were searching for the very well known hero than a relatively obscure emperor. Now, at the top of this Achilles page you will (among other things) find the following hatnote: | An example would be when a user searches for the emperor [[wikipedia:Achilleus (emperor)|Achilleus]]. However, the search term "Achilleus" redirects to the page titled [[wikipedia:Achilles|Achilles]] (as in the mythical hero) because it is considered more likely the user were searching for the very well known hero than a relatively obscure emperor. Now, at the top of this Achilles page you will (among other things) find the following hatnote: | ||
: ''"Achilleus" redirects here. For the Roman emperor with this name, see [[Achilleus (Roman usurper)]].'' | : ''"Achilleus" redirects here. For the Roman emperor with this name, see [[wikipedia:Achilleus (Roman usurper)|Achilleus (Roman usurper)]].'' | ||
That text is this template in action. | That text is this template in action. | ||
| Line 26: | Line 26: | ||
== Examples == | == Examples == | ||
* {{tlx|Redirect|Foo}} → {{Redirect|Foo}} | * {{tlx|Redirect|Foo}} → {{Redirect|wikipedia:Foo}} | ||
* {{tlx|Redirect|REDIRECT<nowiki>||</nowiki>PAGE1}} → {{Redirect|REDIRECT||PAGE1}} | * {{tlx|Redirect|REDIRECT<nowiki>||</nowiki>PAGE1}} → {{Redirect|REDIRECT||wikipedia:PAGE1}} | ||
* {{tlx|Redirect|REDIRECT|USE1|PAGE1}} → {{Redirect|REDIRECT|USE1|PAGE1}} | * {{tlx|Redirect|REDIRECT|USE1|PAGE1}} → {{Redirect|REDIRECT|USE1|wikipedia:PAGE1}} | ||
* {{tlx|Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2|USE3|PAGE3}} → {{Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2|USE3|PAGE3}} | * {{tlx|Redirect|REDIRECT|USE1|PAGE1|USE2|wikipedia:PAGE2|USE3|PAGE3}} → {{Redirect|REDIRECT|USE1|wikipedia:PAGE1|USE2|wikipedia:PAGE2|USE3|wikipedia:PAGE3}} | ||
* {{tlx|Redirect|REDIRECT|USE1|PAGE1|and|PAGE2}} → {{Redirect|REDIRECT|USE1|PAGE1|and|PAGE2}} | * {{tlx|Redirect|REDIRECT|USE1|wikipedia:PAGE1|and|wikipedia:PAGE2}} → {{Redirect|REDIRECT|USE1|wikipedia:PAGE1|and|wikipedia:PAGE2}} | ||
* {{tlx|Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2|and|PAGE3}} → {{Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2|and|PAGE3}} | * {{tlx|Redirect|REDIRECT|USE1|PAGE1|USE2|PAGE2|and|PAGE3}} → {{Redirect|REDIRECT|USE1|wikipedia:PAGE1|USE2|wikipedia:PAGE2|and|wikipedia:PAGE3}} | ||
* {{tlx|Redirect|Achilleus|the Emperor with this name|Achilleus (emperor)|other uses|Achilles (disambiguation)}} (as used on the page [[Achilles]]) → {{Redirect|Achilleus|the Emperor with this name|Achilleus (emperor)|other uses|Achilles (disambiguation)}} | * {{tlx|Redirect|Achilleus|the Emperor with this name|Achilleus (emperor)|other uses|Achilles (disambiguation)}} (as used on the page [[wikipedia:Achilles]]) → {{Redirect|Achilleus|the Emperor with this name|wikipedia:Achilleus (emperor)|other uses|wikipedia:Achilles (disambiguation)}} | ||
The {{para|selfref|yes}} option marks the entire hatnote as a Wikipedia self-reference, causing it to be omitted when the page content is reused outside of Wikipedia (see {{tl|self reference}} and [[MOS:SELFREF]] for more details). | The {{para|selfref|yes}} option marks the entire hatnote as a Wikipedia self-reference, causing it to be omitted when the page content is reused outside of Wikipedia (see {{tl|self reference}} and [[wikipedia:MOS:SELFREF]] for more details). | ||
== More complex uses == | == More complex uses == | ||
| Line 42: | Line 42: | ||
* {{tl|Redirect-several}} (for several redirects, without listing each) | * {{tl|Redirect-several}} (for several redirects, without listing each) | ||
* {{tl|Redirect-distinguish}} | * {{tl|Redirect-distinguish}} | ||
*{{tl|See Wiktionary}} with "redirect" field | * {{tl|See Wiktionary}} with "redirect" field | ||
* {{tl|Technical reasons}} | * {{tl|Technical reasons}} | ||
| Line 99: | Line 99: | ||
"selfref": { | "selfref": { | ||
"label": "Is self-reference?", | "label": "Is self-reference?", | ||
"description": "Set to yes to make this hatnote invisible on e.g. printed versions, for [[WP:SELFREF]]s", | "description": "Set to yes to make this hatnote invisible on e.g. printed versions, for [[wikipedia:WP:SELFREF]]s", | ||
"type": "boolean", | "type": "boolean", | ||
"default": "no", | "default": "no", | ||
| Line 114: | Line 114: | ||
* {{tl|no redirect}}, {{tlf|-r}} | * {{tl|no redirect}}, {{tlf|-r}} | ||
* {{tl|is redirect}}, returns yes/<blank> | * {{tl|is redirect}}, returns yes/<blank> | ||
*{{tl|Shortcut}}, for creating redirects primarily within the Wikipedia namespace that uses shorter names (e.g. [[MOS:SMALLCAPS]] or [[WP:AN]]). | *{{tl|Shortcut}}, for creating redirects primarily within the Wikipedia namespace that uses shorter names (e.g. [[wikipedia:MOS:SMALLCAPS]] or [[wikipedia:WP:AN]]). | ||
*[[Wikipedia:Template_index/Redirect_pages#List_of_redirects_by_function|Rcat functional index]] | *[[wikipedia:Wikipedia:Template_index/Redirect_pages#List_of_redirects_by_function|Rcat functional index]] | ||
<includeonly>{{Sandbox other|| | <includeonly>{{Sandbox other|| | ||