Template:This is a redirect/doc

__NOWYSIWYG__

Description
This template is based on a proposal to standardize redirect templates. Its basic purpose is to simplify the process of tagging redirects.

Used by itself with no parameters ( or ), the template will appear as above and will automatically sort the page into. That category will also be populated if the first parameter is empty while rcats occupy the second, third, and so on. This is useful when an editor adds rcats and yet feels unsure that there may be at least one other rcat with category that may be used to tag the redirect. Those contributors who monitor the miscellaneous category will check these on an equable basis and decide if another rcat(s) is needed. Then the empty first parameter may be excluded by removing either the first or second pipe. That will remove the redirect from Category:Miscellaneous redirects. See below for more information.

This template may hold up to seven different redirect category (rcat) templates. Add this template to a redirect page in the following manner:
 * 1) REDIRECT (target page name)


 * Note the double pipe; this indicates an empty first parameter and will populate in addition to the  and  categories.

Generally for good readability on the Edit screen, this template is placed on the third line of the redirect as follows:

Apart from e1 through e7, which may be used to clarify the editor's choice of category(ies), other parameters are used as follows: The template transcludes whatever other template begins with "R ", followed by the parameter's text. For example:

...uses the rcat R from airport code and produces:


 * An error box may appear that will illustrate what happens if an editor uses an rcat in the wrong namespace. In addition to the error box, the redirect will not be sorted to the rcat's category; instead it will populate !

If a template beginning with "R " is not found (for example, R R from airport code does not exist), then the transcluded template is whatever template that has the same title as the exact text given, so  produces the same result as   (it will work with or without the leading "R").

Up to seven rcat templates can be transcluded. Parameters e1 through e7 are optional explanations, which may be used to clarify why a redirect category applies in each particular case.

Example


produces:

Rcat parameters
In addition to this template's own seven parameters that allow it to hold up to seven different rcats, it accepts most or all of the parameters that rcats accept. Two types of rcat parameters will work in this template:
 * one unnamed parameter from each rcat, and
 * a second parameter from each rcat – the   parameter.

This template will accept one optional unnamed parameter for each individual rcat used:

This subdues the category to which R from plural defaults and populates the  category instead. This template will hold up to seven rcats, so there are also seven respective "p" parameters,. Which position the rcat holds will determine the "p" number to use:



In the above example, "from plural" (R from plural) is the sixth and final rcat, so "p6" is used to make the redirect "printworthy". Since "ralterlang" (R from alternative language) holds the 4th position, "p4" is used for the ISO 639 code of the source language, in this case   for English.

Additionally, this template will accept the   parameter (if there is one) from each rcat. This template uses   for any rcat's "2=" parameter. For example, if a redirect exists that is a misspelling of a title, it can be tagged with R from misspelling in the following manner:

Note: if used by itself the template would appear like this:

"Redr" is an alias or shortcut for this template and "p1" is the unnamed parameter described above, in this case the correct spelling. The "n1" parameter can be used when a second rcat parameter,  , is needed. Some misspellings may be helpful in a printed version of Wikipedia, so the second parameter in "R from misspelling" above is used to subdue its default "unprintworthy" sort, and the redirect will populate instead. As with the p# parameters, there are seven n# parameters,, one for each of the seven positions in this template ("typo" is an alias/shortcut for "from misspelling", as in "R typo"):

An example of a "printworthy misspelling" can be found at R from misspelling.

Additional notes
The "to" parameter in this template that was used with R from alternative language has been deprecated. Use the  parameter instead as follows:

This code will sort a redirect into two categories:
 * , and

This template's wiki markup that invokes the "to" parameter should stay in place until the remaining redirects that use that parameter in this template have been modified.

When used alone
There are two ways to sort a redirect into the category. When the Redr template is used without any rcats, it will perform the miscellaneous sort:

...

Also, if one or more rcats are known, but an editor is unsure that there might be one or more other rcats that are needed, then leave the first parameter blank (type two pipes together → ):
 * 1) REDIRECT (target page name)

Monitors of the Miscellaneous redirects category will check the redirect, add other rcats if needed, and then exclude the empty first parameter by deleting one of the first two pipes.

Comparison
Template:This is a redirect/Comparison shows the difference in the appearance of text between when individual rcats are used and when this template is used.