Template:Redirect category shell/doc
| This is a documentation subpage for Template:Redirect category shell. It contains usage information, categories and other content that is not part of the original template page. |
|
- 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 Category:Pages with templates in the wrong namespace! If an error box appears when an edit is previewed, then appropriate changes can be made before the redirect page is actually saved.
Rcat parameters
In addition to this template's ability to act as a shell template for rcats, it accepts all of the parameters that rcats accept. Rcat parameters, when needed, will work in this template as follows:
{{Redirect category shell|
{{R from plural|printworthy}}
}}
This subdues the Unprintworthy redirects category to which {{R from plural}} defaults and populates the Printworthy redirects category instead. The position an rcat holds will have no effect on the parameters of other rcats that are used to tag a redirect:
{{Redirect category shell|
{{R from move}}
{{R from modification}}
{{R from alternative name}}
{{R from alternative language|en}}
{{R for convenience}}
{{R from plural|printworthy}}
{{R printworthy}}
}}
In the above example, {{R from plural}} is the sixth rcat, and its first parameter is used to change from "unprintworthy" to "printworthy". {{R from alternative language}}) holds the 4th position, and its first parameter is used to house the ISO 639 code of the source language, in this case Template:NbspenTemplate:Nbsp for English. It does not matter if the relative position of these rcats changes for any reason, their individual parameters will continue to be effective.
If more rcat parameters are used, then they work the same way. 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:
{{Redirect category shell|
{{R from misspelling|(correct spelling if needed)|printworthy}}
{{R printworthy}}
}}
In this case, the rcat's |1= parameter is the correct spelling (used only if the target of the redirect is not the correct spelling). The rcat's |2= parameter can be used to change from the default "unprintworthy" categorization. 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" category sort, and the redirect will populate Category:Printworthy redirects instead. In this shell template, the order of the rcats will not affect the rcats' parameters. If an editor checks the page history and finds that the above redirect is also the result of a page move and inserts {{R from move}} at the top of the order:
{{Redirect category shell|
{{R from move}}
{{R from misspelling|(correct spelling)|printworthy}}
{{R printworthy}}
}}
...the parameters of the R from misspelling rcat template will not be affected, as they may be when used in the This is a redirect template.
An example of a "printworthy misspelling" can be found at template {{R from misspelling}}.
Another example:
{{Redirect category shell|
{{R from alternative language|ja|es}}
{{R unprintworthy}}
}}
The above code will sort the redirect into three categories:
- Redirects from Japanese-language terms (
|1=ja), - Redirects to Spanish-language terms (
|2=es) and - Unprintworthy redirects
See List of ISO 639-1 codes for other language codes that can be used this way.
When used alone
There are two ways to sort a redirect into the Miscellaneous redirects category. When this template is used without any rcats, it will perform the miscellaneous sort:
{{Redirect category shell}}...
|
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 → ||):
{{Redirect category shell||
{{R from subtopic}}
{{R printworthy}}
}}
Template:R from subtopic Template:R printworthy When appropriate, protection levels are automatically sensed, described and categorized. |
Monitors of the Miscellaneous redirects category will check the redirect, add other rcats if needed and then remove the empty first parameter.
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.
Other templates
This template may also carry and hold other templates within it. Even the {{DEFAULTSORT}} magic word and a sort key may be used either inside this template or below it. Another template commonly used within the Rcat shell template is {{Italic title}} and its shortcut {{ital}} to format titles in italics. Some rcats such as {{R from book}} and {{R from film}} automatically format the redirect names in italics. Any appropriate template may be used within this shell template in the following manner:
{{Redirect category shell|
{{R from move}}
{{R from alternative name}}
{{Italic title}}
{{DEFAULTSORT:Hobbit, The}}
}}
Notes
Mbox note
Printworthiness note Template:See also
See also
- {{Talk page of a redirect}}, an alternative to a redirect when a talk page has already been created
- Wikipedia:Protection policy, for questions related to this template's ability to detect protection levels
- Wikipedia:Template messages/Redirect pages, a functional and an alphabetical index of rcats
- WikiProject Redirect/Style guide
| Template:R template index is an index of redirect category templates. It should not be transcluded nor substituted to any page in Wikipedia. Template {{R help}} redirects here. If you see this warning in the history (diff) of a redirect, then template {{R to help}} was probably meant instead. Please replace template {{R help}} with template {{R to help}}. |