Changes
Jump to navigation
Jump to search
Template:Redirect category shell/doc (view source)
Revision as of 01:44, 29 January 2023
, 01:44, 29 January 2023edited warning message
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{mbox|image=none|text=[[File:Ambox warning pn.svg|20px|alt=red-outlined triangle containing exclamation point]] {{red|'''Important – please read! {{maroon|This template should ''not'' be used by a bot nor by any automated or semi-automated process without the use of parameters. It should ''not'' be used without parameters ''unless the redirect is manually categorized''. This template may be used as a ''learning tool'' to assist editors who wish to learn how to categorize redirects. ''Only'' those editors who intend to return to the redirect to learn which rcats to use should apply this template without parameters, or with an empty first parameter.}}'''}} <small>([[#When used alone|more below]])</small>}}
{{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}}
{{hatnote|This template supplements the redirect categorization done by adding rcats individually to redirects and by past usage of the now deprecated {{tl|This is a redirect}} template. Its creation and usage is the direct result of [[Template talk:This is a redirect|discussion]]s about the benefits and the shortcomings of the ''This is a redirect'' template.}}
{{Substitution|not|nor should this template and most redirect category (rcat) templates be used to tag [[Wikipedia:Soft redirects|soft redirects]]. Two exceptions are ''{{tl|Wikidata redirect}}'', which can be used on all redirects, hard or soft, and ''{{tl|R category with possibilities}}'', which can only be used on soft redirects in the category namespace}}
{{#ifeq:{{SUBPAGENAME}}|sandbox|{{Template shortcut|Rcat shell/sandbox}}|{{template shortcut|Redirect shell|R cat shell|Rcat shell|RCAT shell|Rcatsh|Redr}}}}
This template is similar to {{tl|WikiProject banner shell}} in that it may be used to add one or more appropriate redirect category ([[WP:RCAT|rcat]]) templates, along with their parameters, to redirects. Additionally, this template ''automatically'' senses, describes, categorizes and changes [[WP:PP|protection levels]] when appropriate. A third important function is to help editors learn more about redirect categorization by use of the {{c|Miscellaneous redirects|manifold sort}}. For more information see the page below and the [[WP:TMR|main rcat '''index''']].
__TOC__
==Purpose==
As with the ''This is a redirect'' template, this template is based on a [[Wikipedia talk:WikiProject Redirect/Archive 1#New meta-template(s) idea|proposal]] to standardize [[wp:redirect templates|redirect templates]] (rcats). Its basic purpose is to simplify the process of tagging and categorizing redirects.
Like the ''This is a redirect'' template, this shell template is also able to help newer contributors learn the redirect category system. Details of this part of the purpose of this shell template may be found in the [[#When used alone|When used alone]] section below.
Protection levels are automatically detected by this template by use of {{tl|pp-protected}} and {{tl|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).<br />
<ref name="mbox" group="Mbox note">When the wiki markup of this template is opened, it is seen that this is an "mbox-based" template. "Mbox" stands for "multi namespace message box", which is a meta-[[Help:A quick guide to templates|template]] that works in all namespaces. There can be a problem with this mbox unless editors are careful to place ''Redirect category shell'' '''on its own line at the ''very beginning of the line'''''. If this is done then all is well; if this is not done, then [[HTML Tidy]] may interfere with the mbox and cause this template to appear in an abnormal and unexpected manner when saved. So be careful where you leave this template placed in a redirect's Edit screen, take another look at the above [[#goodread|readability guide]], and be sure to preview your edits – all your edits.
: '''{{green|Correct:}}'''
<pre>
#REDIRECT [[(target page)]]
{{Redirect category shell||
{{R unprintworthy}}
}}
</pre>
: '''{{red|''Not'' correct:}}'''
<pre>
#REDIRECT [[(target page)]] {{Redirect category shell||{{R unprintworthy}}}}
</pre>
: ''A blank line is usually placed between the redirect target and this template to make the "Edit" screen easier to read.''</ref>
<ref name="printworthiness" group="Printworthiness note">Where the [[WP:printworthiness|printworthiness]] of a [[WP:mainspace|mainspace]] redirect is concerned, there are three kinds of [[WP:RCAT|rcat]]s:
# those that populate the {{c|Printworthy redirects}} category by default,
# those that populate the {{c|Unprintworthy redirects}} category by default, and
# those that do not default to either of the above, and which leave it to the editor to decide based upon best knowledge whether or not a mainspace redirect is suitable for a printed or DVD version of ''Wikipedia''.
At present, those that are types 1 and 2 will populate the appropriate printworthiness category, however the notice will not appear within the mbox of this template unless either {{tl|R printworthy}} or {{tl|R unprintworthy}} is listed as an rcat within this template. For example, if a redirect is tagged with:
<pre>
{{Redirect category shell|
{{R from ambiguous term}}
}}
</pre>
...then the hidden categories populated will be {{c|Redirects from ambiguous pages}}, {{c|Unprintworthy redirects}} and any appropriate protection categories. These will appear at the bottom of the redirect page only to registered users who are logged in and who have set their preferences to see hidden categories. The mbox that will appear to all readers would look like:
{{Redirect category shell|
{{R from ambiguous term/demo|embed=yes}}
}}
To show the printability or printworthiness information in the mbox, then the redirect must be tagged with either the printworthy or unprintworthy rcat as in the following example:
<pre>
{{Redirect category shell|
{{R from ambiguous term}}
{{R unprintworthy}}
}}
</pre>
...which produces:
{{Redirect category shell|
{{R from ambiguous term/demo|embed=yes}}
{{R unprintworthy|embed=yes}}
}}
'''''Only then''' will the printability, ''printworthy'' or ''unprintworthy'', be described within this template's mbox on the redirect page.''</ref>
==Usage==
Used by itself with no parameters, for example, {{tlc|Redirect category shell}} (and its alias {{tlc|Rcat shell}}), the template will appear as it does at the top of this page, and the redirect will populate {{Cat|Miscellaneous redirects}}. 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''. [[#When used alone|See below]] for more information.
This template may hold any number of different redirect category ([[WP:RCAT|rcat]]) templates, usually from one to seven. The choices for editors are listed at [[Wikipedia:Template index/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 [[WP:TDOC|documentation]].
An unnamed parameter, {{para|1}}, has been introduced in this template and works as follows:
<pre>
{{Redirect category shell|1=
{{rcat 1}}
{{rcat 2}}
{{rcat 3}}
{{rcat N}}
}}
</pre>
: ''or'' the {{code|1{{=}}}} may be omitted:
<pre>
{{Redirect category shell|
{{rcat 1}}
{{rcat 2}}
{{rcat 3}}
{{rcat N}}
}}
</pre>
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 wiki markup 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, {{para|2}}, has also been introduced. This gives this template the same "help" functionality that is used in the ''This is a redirect'' template. If the first parameter is left "empty", then {{cat|Miscellaneous redirects}} will be populated:
<pre>
{{Redirect category shell|1=|2=
{{rcat 1}}
{{rcat 2}}
{{rcat N}}
}}
</pre>
:''or'' if a second pipe is placed directly after the first pipe, then that will accomplish the same manifold sort:
<pre>
{{Redirect category shell||
{{rcat 1}}
{{rcat 2}}
{{rcat N}}
}}
</pre>
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:
<pre>
{{Redirect category shell}}
</pre>
{{anchor|goodread}}
This template may be added to a redirect page in the following manner:
<pre>
#REDIRECT [[(target page name)]]
{{Redirect category shell||
{{R from short name}}
{{R unprintworthy}}
}}
</pre>
: It can be noted here that the rcats can also go on the same line as the ''Redirect category shell'' template:
<pre>
#REDIRECT [[(target page name)]]
{{Redirect category shell||{{R from short name}}{{R unprintworthy}}}}
</pre>
: Again, note the double pipe after "shell" above, which indicates an empty first parameter. Leave the first parameter empty to sort a redirect to {{cat|Miscellaneous redirects}} ''in addition to'' the categories of the rcats that are used. In this case the {{c|Redirects from short names}} and {{c|Unprintworthy redirects}} 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:
<pre>
Line 1: #REDIRECT [[(target page name)]]
</pre>
Line 2: {{red|<small>(please leave this line blank for emphasis and ease of reading by editors)</small>}}
<pre>
Line 3: {{Redirect category shell|{{R from move}}{{R to section}}{{R printworthy}}}}
</pre>
: ''See also: section titled '''[[#Mbox-based|Mbox note]]''' below.''
=== Parameters ===
In addition to the unnamed {{para|1}} and {{para|2}} parameters, there is a "hatnote" parameter, {{para|h}}, which provides an italicized TOP note when needed. For example:
<pre>
{{Redirect category shell|h=This code has not been confirmed as an [[International Air Transport Association airport code|IATA]] airport code.|
{{R from airport code}}
}}
</pre>
...uses the rcat {{tl|R from airport code}} and produces:<!-- Note: An Mbox is used below rather than the template to illustrate the error box, which only appears on redirect pages. -->
{{Mbox
| name = This is a redirect/rcat
| type = move
| image = none
| style = margin-top: 1.1em; border: solid 1px darkblue; border-left-width: 0.5em;
| textstyle = padding-top: 0.9em; padding-bottom: 0.9em;
| text = [[File:Symbol redirect arrow with gradient.svg|25px|link=]] '''This page is a [[Wikipedia:Redirect|redirect]]. <small>The following [[Wikipedia:Categorizing redirects|categories]] are used to track and monitor this redirect:</small>'''
:: ''This code has not been confirmed as an [[International Air Transport Association airport code|IATA]] airport code.''
* {{R from airport code|embed=yes}}
{{Ombox|type=content|image=[[File:Stop hand orange.svg|50px]]|text={{Error|The above [[WP:RCAT|rcat]] should only be used to categorize redirects that are in the ''[[WP:main|main]]'' namespace.}}}}
''<small>When appropriate, [[WP:PP|protection levels]] are automatically sensed, described and categorized.</small>''
}}
:''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 '''''{{cat|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'''.''
:''Also, note the pipe symbol ''(|)'' that follows the text in the {{para|h}} parameter. If this pipe is omitted, very unusual results will be seen when your edit is previewed or saved. Be sure to include that pipe at the very end of the text if the {{para|h}} parameter is used to form a hatnote.''
==== 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:
<pre>
{{Redirect category shell|
{{R from plural|printworthy}}
}}
</pre>
This subdues the {{c|Unprintworthy redirects}} category to which {{tl|R from plural}} defaults and populates the {{c|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:
<pre style="font-size:95%;overflow:auto;">
{{Redirect category shell|
{{R from move}}
{{R from modification}}
{{R from alternative name}}
{{R from alternative language|en|es}}
{{R for convenience}}
{{R from plural|printworthy}}
{{R printworthy}}
}}
</pre>
In the above example, {{tl|R from plural}} is the sixth rcat, and its first parameter is used to change from "unprintworthy" to "printworthy". {{tl|R from alternative language}}) holds the 4th position, and its first parameter is used to house the [[Wikipedia:Template messages/Redirect language codes|ISO 639 language code]] of the source language, in this case '''<code>{{nbsp}}en{{nbsp}}</code>''' for [[English language|English]]. Its second parameter houses the language code for the targeted page, in this case '''<code>{{nbsp}}es{{nbsp}}</code>''' for the [[Spanish language]]. 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 {{tl|R from misspelling}} in the following manner:
<pre>
{{Redirect category shell|
{{R from misspelling|(correct spelling if needed)|printworthy}}
{{R printworthy}}
}}
</pre>
In this case, the rcat's ''{{para|1}}'' parameter is the correct spelling (used only if the target of the redirect is '''not''' the correct spelling). The rcat's ''{{para|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 {{cat|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 {{tl|R from move}} at the top of the order:
<pre>
{{Redirect category shell|
{{R from move}}
{{R from misspelling|(correct spelling)|printworthy}}
{{R printworthy}}
}}
</pre>
...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 {{tl|R from misspelling}}.
'''Another example:'''
<pre>
{{Redirect category shell|
{{R from alternative language|ja|es}}
{{R unprintworthy}}
}}
</pre>
The above code will sort the redirect into three categories:
* {{c|Redirects from Japanese-language terms}} ({{para|1|ja}}),
* {{c|Redirects to Spanish-language terms}} ({{para|2|es}}) and
* {{c|Unprintworthy redirects}}
''See the lists of [[List of ISO 639-1 codes|ISO 639-1]] and [[List of ISO 639-2 codes|ISO 639-2]] codes for two- and three-letter language codes that can be used this way. See also [[Wikipedia:Template messages/Redirect language codes]] for common codes that are already used on redirects.''
=== When used alone ===
This template is designed to help contributors who are unfamiliar with categorizing redirects by enabling them to sort redirects into the monitored {{c|Miscellaneous redirects}} category. Do not hesitate to use this important function to help with sorting redirects to correct and appropriate categories.
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:
{{tlx|Redirect category shell}}...
{{Redirect category shell|nocat=true}}
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 → <code>||</code>):
<pre>
{{Redirect category shell||
{{R from subtopic}}
{{R printworthy}}
}}
</pre>
{{Redirect category shell|nocat=true||
{{R from subtopic|embed=yes}}
{{R printworthy|embed=yes}}
}}
Monitors of the ''Miscellaneous redirects'' category will check the redirect, add other rcats if needed and then remove the empty first parameter.
==Comparison==
[[Template:Redirect category shell/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 {{tl|DEFAULTSORT}} magic word and a [[WP:sort key|sort key]] may be used either inside this template or below it. Another template commonly used within the ''Redirect category shell'' template is {{tl|Italic title}} and its shortcut to format titles in italics. Some rcats such as {{tl|R from book}} and {{tl|R from film}} automatically format the redirect names in italics. Any appropriate template may be used within this shell template in the following manner:
<pre>
{{Redirect category shell|
{{R from move}}
{{R from alternative name}}
{{Italic title}}
{{DEFAULTSORT:Hobbit, The}}
}}
</pre>
==Notes==
{{anchor|Mbox-based}}
'''Mbox note'''
{{Reflist|group="Mbox note"}}
'''Printworthiness note'''
{{See also|Wikipedia:Printability}}
{{Reflist|group="Printworthiness note"}}
==See also==
* {{tl|Talk page of a redirect}}, to "[[WP:SRD|soft]]" redirect a [[WP:subject page|subject page]]'s talk page that has already been created '''''and given content''''' (project banners, deletion/merge notices, discussions)
* [[Wikipedia:Protection policy]], for questions related to this template's ability to detect protection levels
* [[Wikipedia:Template index/Redirect pages]], a functional and an alphabetical index of rcats
* [[Wikipedia:WikiProject Redirect/Style guide|WikiProject Redirect/Style guide]]
==Tracking categories==
* {{clc|Redirect category shell without parameters}}
==TemplateData==
{{TemplateData header}}
<templatedata>
{
"params": {
"1": {
"label": "Redirect categories",
"description": "1 or more redirect category templates.",
"example": "{{R from alternative name}}",
"type": "content",
"suggested": true
},
"2": {
"label": "Redirect categories (more needed)",
"description": "Same as Redirect categories, except that the redirect is also added to Category:Miscellaneous redirects.",
"type": "content"
},
"h": {
"label": "Hatnote",
"description": "A hatnote to display above the redirect categories.",
"type": "line"
},
"nocat": {
"label": "No category",
"description": "Don't add this redirect to Category:Miscellaneous redirects, even if Redirect categories has been left empty.",
"type": "boolean"
},
"category": {
"label": "Category",
"description": "The category to add this redirect to if the Redirect categories parameter is empty. Defaults to Category:Miscellaneous redirects.",
"example": "[[Category:Miscellaneous redirects]]",
"type": "line"
}
},
"description": "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, categorizes and changes protection levels when appropriate.",
"paramOrder": [
"1",
"2",
"h",
"nocat",
"category"
]
}
</templatedata>
{{R template index}}
<includeonly>{{sandbox other||
<!-- Categories go below this line, please; interwikis go to Wikidata, thank you! -->
[[Category:WikiProject Redirect templates|Redirect category shell]]
[[Category:Redirect templates| ]]
[[Category:Template shell templates]]
}}</includeonly>
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{mbox|image=none|text=[[File:Ambox warning pn.svg|20px|alt=red-outlined triangle containing exclamation point]] {{red|'''Important – please read! {{maroon|This template should ''not'' be used by a bot nor by any automated or semi-automated process without the use of parameters. It should ''not'' be used without parameters ''unless the redirect is manually categorized''. This template may be used as a ''learning tool'' to assist editors who wish to learn how to categorize redirects. ''Only'' those editors who intend to return to the redirect to learn which rcats to use should apply this template without parameters, or with an empty first parameter.}}'''}} <small>([[#When used alone|more below]])</small>}}
{{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}}
{{hatnote|This template supplements the redirect categorization done by adding rcats individually to redirects and by past usage of the now deprecated {{tl|This is a redirect}} template. Its creation and usage is the direct result of [[Template talk:This is a redirect|discussion]]s about the benefits and the shortcomings of the ''This is a redirect'' template.}}
{{Substitution|not|nor should this template and most redirect category (rcat) templates be used to tag [[Wikipedia:Soft redirects|soft redirects]]. Two exceptions are ''{{tl|Wikidata redirect}}'', which can be used on all redirects, hard or soft, and ''{{tl|R category with possibilities}}'', which can only be used on soft redirects in the category namespace}}
{{#ifeq:{{SUBPAGENAME}}|sandbox|{{Template shortcut|Rcat shell/sandbox}}|{{template shortcut|Redirect shell|R cat shell|Rcat shell|RCAT shell|Rcatsh|Redr}}}}
This template is similar to {{tl|WikiProject banner shell}} in that it may be used to add one or more appropriate redirect category ([[WP:RCAT|rcat]]) templates, along with their parameters, to redirects. Additionally, this template ''automatically'' senses, describes, categorizes and changes [[WP:PP|protection levels]] when appropriate. A third important function is to help editors learn more about redirect categorization by use of the {{c|Miscellaneous redirects|manifold sort}}. For more information see the page below and the [[WP:TMR|main rcat '''index''']].
__TOC__
==Purpose==
As with the ''This is a redirect'' template, this template is based on a [[Wikipedia talk:WikiProject Redirect/Archive 1#New meta-template(s) idea|proposal]] to standardize [[wp:redirect templates|redirect templates]] (rcats). Its basic purpose is to simplify the process of tagging and categorizing redirects.
Like the ''This is a redirect'' template, this shell template is also able to help newer contributors learn the redirect category system. Details of this part of the purpose of this shell template may be found in the [[#When used alone|When used alone]] section below.
Protection levels are automatically detected by this template by use of {{tl|pp-protected}} and {{tl|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).<br />
<ref name="mbox" group="Mbox note">When the wiki markup of this template is opened, it is seen that this is an "mbox-based" template. "Mbox" stands for "multi namespace message box", which is a meta-[[Help:A quick guide to templates|template]] that works in all namespaces. There can be a problem with this mbox unless editors are careful to place ''Redirect category shell'' '''on its own line at the ''very beginning of the line'''''. If this is done then all is well; if this is not done, then [[HTML Tidy]] may interfere with the mbox and cause this template to appear in an abnormal and unexpected manner when saved. So be careful where you leave this template placed in a redirect's Edit screen, take another look at the above [[#goodread|readability guide]], and be sure to preview your edits – all your edits.
: '''{{green|Correct:}}'''
<pre>
#REDIRECT [[(target page)]]
{{Redirect category shell||
{{R unprintworthy}}
}}
</pre>
: '''{{red|''Not'' correct:}}'''
<pre>
#REDIRECT [[(target page)]] {{Redirect category shell||{{R unprintworthy}}}}
</pre>
: ''A blank line is usually placed between the redirect target and this template to make the "Edit" screen easier to read.''</ref>
<ref name="printworthiness" group="Printworthiness note">Where the [[WP:printworthiness|printworthiness]] of a [[WP:mainspace|mainspace]] redirect is concerned, there are three kinds of [[WP:RCAT|rcat]]s:
# those that populate the {{c|Printworthy redirects}} category by default,
# those that populate the {{c|Unprintworthy redirects}} category by default, and
# those that do not default to either of the above, and which leave it to the editor to decide based upon best knowledge whether or not a mainspace redirect is suitable for a printed or DVD version of ''Wikipedia''.
At present, those that are types 1 and 2 will populate the appropriate printworthiness category, however the notice will not appear within the mbox of this template unless either {{tl|R printworthy}} or {{tl|R unprintworthy}} is listed as an rcat within this template. For example, if a redirect is tagged with:
<pre>
{{Redirect category shell|
{{R from ambiguous term}}
}}
</pre>
...then the hidden categories populated will be {{c|Redirects from ambiguous pages}}, {{c|Unprintworthy redirects}} and any appropriate protection categories. These will appear at the bottom of the redirect page only to registered users who are logged in and who have set their preferences to see hidden categories. The mbox that will appear to all readers would look like:
{{Redirect category shell|
{{R from ambiguous term/demo|embed=yes}}
}}
To show the printability or printworthiness information in the mbox, then the redirect must be tagged with either the printworthy or unprintworthy rcat as in the following example:
<pre>
{{Redirect category shell|
{{R from ambiguous term}}
{{R unprintworthy}}
}}
</pre>
...which produces:
{{Redirect category shell|
{{R from ambiguous term/demo|embed=yes}}
{{R unprintworthy|embed=yes}}
}}
'''''Only then''' will the printability, ''printworthy'' or ''unprintworthy'', be described within this template's mbox on the redirect page.''</ref>
==Usage==
Used by itself with no parameters, for example, {{tlc|Redirect category shell}} (and its alias {{tlc|Rcat shell}}), the template will appear as it does at the top of this page, and the redirect will populate {{Cat|Miscellaneous redirects}}. 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''. [[#When used alone|See below]] for more information.
This template may hold any number of different redirect category ([[WP:RCAT|rcat]]) templates, usually from one to seven. The choices for editors are listed at [[Wikipedia:Template index/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 [[WP:TDOC|documentation]].
An unnamed parameter, {{para|1}}, has been introduced in this template and works as follows:
<pre>
{{Redirect category shell|1=
{{rcat 1}}
{{rcat 2}}
{{rcat 3}}
{{rcat N}}
}}
</pre>
: ''or'' the {{code|1{{=}}}} may be omitted:
<pre>
{{Redirect category shell|
{{rcat 1}}
{{rcat 2}}
{{rcat 3}}
{{rcat N}}
}}
</pre>
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 wiki markup 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, {{para|2}}, has also been introduced. This gives this template the same "help" functionality that is used in the ''This is a redirect'' template. If the first parameter is left "empty", then {{cat|Miscellaneous redirects}} will be populated:
<pre>
{{Redirect category shell|1=|2=
{{rcat 1}}
{{rcat 2}}
{{rcat N}}
}}
</pre>
:''or'' if a second pipe is placed directly after the first pipe, then that will accomplish the same manifold sort:
<pre>
{{Redirect category shell||
{{rcat 1}}
{{rcat 2}}
{{rcat N}}
}}
</pre>
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:
<pre>
{{Redirect category shell}}
</pre>
{{anchor|goodread}}
This template may be added to a redirect page in the following manner:
<pre>
#REDIRECT [[(target page name)]]
{{Redirect category shell||
{{R from short name}}
{{R unprintworthy}}
}}
</pre>
: It can be noted here that the rcats can also go on the same line as the ''Redirect category shell'' template:
<pre>
#REDIRECT [[(target page name)]]
{{Redirect category shell||{{R from short name}}{{R unprintworthy}}}}
</pre>
: Again, note the double pipe after "shell" above, which indicates an empty first parameter. Leave the first parameter empty to sort a redirect to {{cat|Miscellaneous redirects}} ''in addition to'' the categories of the rcats that are used. In this case the {{c|Redirects from short names}} and {{c|Unprintworthy redirects}} 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:
<pre>
Line 1: #REDIRECT [[(target page name)]]
</pre>
Line 2: {{red|<small>(please leave this line blank for emphasis and ease of reading by editors)</small>}}
<pre>
Line 3: {{Redirect category shell|{{R from move}}{{R to section}}{{R printworthy}}}}
</pre>
: ''See also: section titled '''[[#Mbox-based|Mbox note]]''' below.''
=== Parameters ===
In addition to the unnamed {{para|1}} and {{para|2}} parameters, there is a "hatnote" parameter, {{para|h}}, which provides an italicized TOP note when needed. For example:
<pre>
{{Redirect category shell|h=This code has not been confirmed as an [[International Air Transport Association airport code|IATA]] airport code.|
{{R from airport code}}
}}
</pre>
...uses the rcat {{tl|R from airport code}} and produces:<!-- Note: An Mbox is used below rather than the template to illustrate the error box, which only appears on redirect pages. -->
{{Mbox
| name = This is a redirect/rcat
| type = move
| image = none
| style = margin-top: 1.1em; border: solid 1px darkblue; border-left-width: 0.5em;
| textstyle = padding-top: 0.9em; padding-bottom: 0.9em;
| text = [[File:Symbol redirect arrow with gradient.svg|25px|link=]] '''This page is a [[Wikipedia:Redirect|redirect]]. <small>The following [[Wikipedia:Categorizing redirects|categories]] are used to track and monitor this redirect:</small>'''
:: ''This code has not been confirmed as an [[International Air Transport Association airport code|IATA]] airport code.''
* {{R from airport code|embed=yes}}
{{Ombox|type=content|image=[[File:Stop hand orange.svg|50px]]|text={{Error|The above [[WP:RCAT|rcat]] should only be used to categorize redirects that are in the ''[[WP:main|main]]'' namespace.}}}}
''<small>When appropriate, [[WP:PP|protection levels]] are automatically sensed, described and categorized.</small>''
}}
:''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 '''''{{cat|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'''.''
:''Also, note the pipe symbol ''(|)'' that follows the text in the {{para|h}} parameter. If this pipe is omitted, very unusual results will be seen when your edit is previewed or saved. Be sure to include that pipe at the very end of the text if the {{para|h}} parameter is used to form a hatnote.''
==== 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:
<pre>
{{Redirect category shell|
{{R from plural|printworthy}}
}}
</pre>
This subdues the {{c|Unprintworthy redirects}} category to which {{tl|R from plural}} defaults and populates the {{c|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:
<pre style="font-size:95%;overflow:auto;">
{{Redirect category shell|
{{R from move}}
{{R from modification}}
{{R from alternative name}}
{{R from alternative language|en|es}}
{{R for convenience}}
{{R from plural|printworthy}}
{{R printworthy}}
}}
</pre>
In the above example, {{tl|R from plural}} is the sixth rcat, and its first parameter is used to change from "unprintworthy" to "printworthy". {{tl|R from alternative language}}) holds the 4th position, and its first parameter is used to house the [[Wikipedia:Template messages/Redirect language codes|ISO 639 language code]] of the source language, in this case '''<code>{{nbsp}}en{{nbsp}}</code>''' for [[English language|English]]. Its second parameter houses the language code for the targeted page, in this case '''<code>{{nbsp}}es{{nbsp}}</code>''' for the [[Spanish language]]. 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 {{tl|R from misspelling}} in the following manner:
<pre>
{{Redirect category shell|
{{R from misspelling|(correct spelling if needed)|printworthy}}
{{R printworthy}}
}}
</pre>
In this case, the rcat's ''{{para|1}}'' parameter is the correct spelling (used only if the target of the redirect is '''not''' the correct spelling). The rcat's ''{{para|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 {{cat|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 {{tl|R from move}} at the top of the order:
<pre>
{{Redirect category shell|
{{R from move}}
{{R from misspelling|(correct spelling)|printworthy}}
{{R printworthy}}
}}
</pre>
...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 {{tl|R from misspelling}}.
'''Another example:'''
<pre>
{{Redirect category shell|
{{R from alternative language|ja|es}}
{{R unprintworthy}}
}}
</pre>
The above code will sort the redirect into three categories:
* {{c|Redirects from Japanese-language terms}} ({{para|1|ja}}),
* {{c|Redirects to Spanish-language terms}} ({{para|2|es}}) and
* {{c|Unprintworthy redirects}}
''See the lists of [[List of ISO 639-1 codes|ISO 639-1]] and [[List of ISO 639-2 codes|ISO 639-2]] codes for two- and three-letter language codes that can be used this way. See also [[Wikipedia:Template messages/Redirect language codes]] for common codes that are already used on redirects.''
=== When used alone ===
This template is designed to help contributors who are unfamiliar with categorizing redirects by enabling them to sort redirects into the monitored {{c|Miscellaneous redirects}} category. Do not hesitate to use this important function to help with sorting redirects to correct and appropriate categories.
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:
{{tlx|Redirect category shell}}...
{{Redirect category shell|nocat=true}}
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 → <code>||</code>):
<pre>
{{Redirect category shell||
{{R from subtopic}}
{{R printworthy}}
}}
</pre>
{{Redirect category shell|nocat=true||
{{R from subtopic|embed=yes}}
{{R printworthy|embed=yes}}
}}
Monitors of the ''Miscellaneous redirects'' category will check the redirect, add other rcats if needed and then remove the empty first parameter.
==Comparison==
[[Template:Redirect category shell/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 {{tl|DEFAULTSORT}} magic word and a [[WP:sort key|sort key]] may be used either inside this template or below it. Another template commonly used within the ''Redirect category shell'' template is {{tl|Italic title}} and its shortcut to format titles in italics. Some rcats such as {{tl|R from book}} and {{tl|R from film}} automatically format the redirect names in italics. Any appropriate template may be used within this shell template in the following manner:
<pre>
{{Redirect category shell|
{{R from move}}
{{R from alternative name}}
{{Italic title}}
{{DEFAULTSORT:Hobbit, The}}
}}
</pre>
==Notes==
{{anchor|Mbox-based}}
'''Mbox note'''
{{Reflist|group="Mbox note"}}
'''Printworthiness note'''
{{See also|Wikipedia:Printability}}
{{Reflist|group="Printworthiness note"}}
==See also==
* {{tl|Talk page of a redirect}}, to "[[WP:SRD|soft]]" redirect a [[WP:subject page|subject page]]'s talk page that has already been created '''''and given content''''' (project banners, deletion/merge notices, discussions)
* [[Wikipedia:Protection policy]], for questions related to this template's ability to detect protection levels
* [[Wikipedia:Template index/Redirect pages]], a functional and an alphabetical index of rcats
* [[Wikipedia:WikiProject Redirect/Style guide|WikiProject Redirect/Style guide]]
==Tracking categories==
* {{clc|Redirect category shell without parameters}}
==TemplateData==
{{TemplateData header}}
<templatedata>
{
"params": {
"1": {
"label": "Redirect categories",
"description": "1 or more redirect category templates.",
"example": "{{R from alternative name}}",
"type": "content",
"suggested": true
},
"2": {
"label": "Redirect categories (more needed)",
"description": "Same as Redirect categories, except that the redirect is also added to Category:Miscellaneous redirects.",
"type": "content"
},
"h": {
"label": "Hatnote",
"description": "A hatnote to display above the redirect categories.",
"type": "line"
},
"nocat": {
"label": "No category",
"description": "Don't add this redirect to Category:Miscellaneous redirects, even if Redirect categories has been left empty.",
"type": "boolean"
},
"category": {
"label": "Category",
"description": "The category to add this redirect to if the Redirect categories parameter is empty. Defaults to Category:Miscellaneous redirects.",
"example": "[[Category:Miscellaneous redirects]]",
"type": "line"
}
},
"description": "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, categorizes and changes protection levels when appropriate.",
"paramOrder": [
"1",
"2",
"h",
"nocat",
"category"
]
}
</templatedata>
{{R template index}}
<includeonly>{{sandbox other||
<!-- Categories go below this line, please; interwikis go to Wikidata, thank you! -->
[[Category:WikiProject Redirect templates|Redirect category shell]]
[[Category:Redirect templates| ]]
[[Category:Template shell templates]]
}}</includeonly>