Template:Redirect/doc

Description
This template is mainly meant to be used as a substitute for the "#REDIRECT" syntax. The difference is that it adds the proper redirect categories with the proper sort key.

It is also used on the redirect pages to provide the proper redirect categories. You don't have to bother about this if you use the first point.

General Use
To use this template as a replacement for the "#REDIRECT" syntax, simply replace the content of a page with

where &lt;destination&gt; is the name of the page targeted by the redirect, without the link brackets.

Note that the template must be substituted (i.e., the "subst:" part is fundamental), or it won't work.

For exemple, if you want to redirect a page to Portgas D. Ace, replace its contents by Portgas D. Ace It puts the redirect page to Category:Unsorted Redirects, with "Portgas D. Ace" as a sort key.

Alternative Name Redirects
The vast majority of redirects are used to support an alternative article title: epithet or surname, unofficial name, spelling difference, capitalization, etc. Those redirects are meant to help the reader of the wiki; but they should not be used on articles.

To mark a redirect as "alternative name", simply use the following syntax:

For example, "Robin" is a redirect to Nico Robin; it was created with Nico Robin It puts the redirect page to Category:Alternative Name Redirects, with "Nico Robin" as a sort key.

Authorized Redirects
In general, redirects are not allowed on articles. However, there are exceptions, when the redirect is an independant topic that could be an article by itself, but isn't for some reason (generally because there is not enough material for it to be an independant article).

To mark a redirect as "authorized", simply use the following syntax:

For example, the Humandrill article is a redirect to the Humandrill part of the Animal Species article; it was created with Animal Species/Summit War Saga#Humandrill It puts the redirect page to Category:Authorized Redirects, with "Humandrill" as a sort key (and not "Animal Species/Summit War Saga#Humandrill", as it would have been in the general case).

"Redirects to Authorized Redirects"
The idea of authorized redirects has an issue: the MediaWiki software cannot cope with double redirects, so it's impossible to use an authorized redirect exactly as if it was a standard article. For example, we cannot redirect Mandrill to Humandrill directly, as it would create a double redirect.

In order to keep a trace of all those redirects that should point to an authorized redirect (but do not because of software limitations), they should be categorized separately. It is easy to do with the redirect template:

Here, the target parameter is used to provide the name of the authorized redirect that would be the target of the current redirect, if not for software limitations.

For example, any redirect to Humandrill, such as "Mandrill", "Mandrills", "Humandrills", "Fighting Monkeys" or whatnot were created (or could be created) with Animal Species/Summit War Saga#Humandrill It puts the redirect page to Category:Redirects to Authorized Redirects, with "Humandrill" as a sort key: this way it is easy to find all redirects to an authorized redirect, simply by browsing the category.

The above code also puts the redirect in Category:Unsorted Redirects, with "Humandrill" as a sort key. However, such redirects are generally "alternative name" redirects, so the best code would be Animal Species/Summit War Saga#Humandrill Here, it puts the redirect page to both Category:Redirects to Authorized Redirects and Category:Alternative Name Redirects, with "Humandrill" as a sort key.

Use on Redirect Pages
This is not meant to be used directly, since the substitution automatically puts the correct parameters. Here is the info anyway:
 * parameter subst=no indicates the no-substitution usage.
 * parameter type= indicates the type of the redirect: authorized, alternative, or unsorted. If absent, the page is categorized under the global Category:Redirects, which makes it easy to spot mistakes.
 * parameter target= indicates the targeted authorized redirect, if needed.