Template:Redirect category shell/doc

This template may be used to add one or more appropriate redirect category (rcat) templates, along with their parameters, to redirects. Additionally, this template automatically senses, describes and categorizes protection levels. For more information, see the page below and follow the boldface category link above.

Purpose
This template supplements the redirect categorization done by the This is a redirect template or by adding rcats individually to redirects. It is the direct result of discussions about the benefits and the shortcomings of the This is a redirect template.

As with the This is a redirect template, this template is based on a proposal to standardize redirect templates (rcats). Its basic purpose is to simplify the process of tagging and categorizing redirects.

Protection levels are automatically detected by this template by use of pp-protected and pp-move. When edit protection or move protection (or both) is applied to a redirect that has been tagged with this template, the protection level is automatically detected, and the redirect will be tagged with a protection rcat and sorted to the appropriate protection-related category(ies). When protection is altered or removed, then the protection-related rcats and category(ies) will also be (automatically) changed or removed from the redirect.

This template can categorize and display the text (with parameters) of any number of rcats that are needed (usually from one to seven).

Usage
Used by itself with no parameters, for example,, the template will appear as it does at the top of this page, and the redirect will populate. That category will also be populated if the first parameter is left empty while rcats occupy the second parameter. 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. Monitors of the Miscellaneous redirects category will then help 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 any number of different redirect category (rcat) templates, usually from one to seven. The choices for editors are listed at Template messages/Redirect pages both alphabetically and by function. Any of those rcats may be used either with their full template name, e.g., R from alternative language, or with an alias (shortcut redirect), which may be found in each rcat's documentation.

An unnamed parameter, 1, has been introduced in this template and works as follows:

...or more simply:

As with all templates that have unnamed (numbered) parameters, the numbers and equal signs may be omitted.

"N" represents the highest number of rcats that can be used in this template, and at this point the only limit would be any wikimarkup ceiling that may exist. Usually, from one to seven rcats suffice; however, more rcats can be used if required.

The actual sequence of rcats is left to editors – there is no priority as to which rcat should be "first" and which rcats should "follow" in any particular order.

A second unnamed parameter, 2, has also been introduced. This gives this template the same "help" functionality that is used in the This is a redirect template. If a second pipe is placed directly after the first pipe, then will be populated:

Note the double pipe after the word "shell" above, which indicates an empty first parameter. Editors who monitor the Miscellaneous redirects category will come to the redirect and check, add or remove rcats as needed.

Also, when used by itself this template will appear as it does at the top of this page and populate the Miscellaneous redirects category:

This template may be added to a redirect page in the following manner:
 * 1) REDIRECT (target page name)


 * Again, note the double pipe after "shell" above, which indicates an empty first parameter. Leave the first parameter empty to sort a redirect to  in addition to the categories of the rcats that are used.  In this case the  and  categories will also be populated.  Monitors of the "Miscellaneous redirects" category will help editors when needed.

Generally for good readability on the edit screen, this template is placed beginning on the third line of that screen as follows: Line 1: #REDIRECT (target page name) Line 2: Line 3:
 * See also: section titled Mbox note below.

Parameters
In addition to the unnamed 1 and 2 parameters, there is a "hatnote" parameter, h, which provides an italicized TOP note when needed. For example:

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


 * An error box appears that illustrates what happens if an editor uses an rcat in the wrong namespace. Correct namespaces are found on individual rcat documentation pages.  In addition to the error box, the redirect will not be sorted to the rcat's category; instead it will populate ! If an error box appears when an edit is previewed, then appropriate changes can be made before'' the redirect page is actually saved.

When used alone
There are two ways to sort a redirect into the category. When this 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 → ):

Monitors of the Miscellaneous redirects category will check the redirect, add other rcats if needed and then remove the empty first parameter.

(MORE TO COME)