Usage Bản_mẫu:Redirect_category_shell

Used by itself with no parameters, for example, {{Redirect category shell}} (and its alias {{Rcat shell}}), the template will appear as it does at the top of this page, and the redirect will populate Thể loại: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. 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 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 documentation.

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

{{Redirect category shell|1={{rcat 1}}{{rcat 2}}{{rcat 3}}{{rcat N}}}}
or the 1= may be omitted:
{{Redirect category shell|{{rcat 1}}{{rcat 2}}{{rcat 3}}{{rcat N}}}}

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, |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 Thể loại:Miscellaneous redirects will be populated:

{{Redirect category shell|1=|2={{rcat 1}}{{rcat 2}}{{rcat N}}}}
or if a second pipe is placed directly after the first pipe, then that will accomplish the same manifold sort:
{{Redirect category shell||{{rcat 1}}{{rcat 2}}{{rcat N}}}}

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:

{{Redirect category shell}}

This template may be added to a redirect page in the following manner:

#REDIRECT [[(target page name)]]{{Redirect category shell||{{R from short name}}{{R unprintworthy}}}}
It can be noted here that the rcats can also go on the same line as the Redirect category shell template:
#REDIRECT [[(target page name)]]{{Redirect category shell||{{R from short name}}{{R unprintworthy}}}}
Again, note the double pipe after "shell" above, which indicates an empty first parameter. Leave the first parameter empty to sort a redirect to Thể loại:Miscellaneous redirects in addition to the categories of the rcats that are used. In this case the Redirects from short names and 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:

Line 1: #REDIRECT [[(target page name)]]
Line 2: (please leave this line blank for emphasis and ease of reading by editors)
Line 3: {{Redirect category shell|{{R from move}}{{R to section}}{{R printworthy}}}}
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:

{{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}}}}

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

This page is a redirect. The following categories are used to track and monitor this redirect:This code has not been confirmed as an IATA airport code.
The above rcat should only be used to categorize redirects that are in the main namespace.
When appropriate, protection levels are automatically sensed, described and categorized.
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 Thể loại: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 |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 |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:

{{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|es}}{{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 language code of the source language, in this case  en  for English. Its second parameter houses the language code for the targeted page, in this case  es  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 {{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 Thể loại: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:

See the lists of ISO 639-1 and 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 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:

{{Redirect category shell}}...

Trang này là một trang đổi hướng. Những thể loại sau được dùng để theo dõi và giám sát trang đổi hướng này:
  • Important – Please Read! This template should not be applied without parameters by bot nor by any automated or semi-automated process. It should not be used without parameters unless you want to learn how to categorize redirects. For editors who want to learn how to categorize redirects, this template is a learning tool. 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!
  • Sắp xếp đa dạng: Nếu bạn cần trợ giúp để xác định thể loại phù hợp, thì trang đổi hướng này sẽ nằm trong Thể loại:Trang đổi hướng khác. Người theo dõi thể loại đó sẽ kiểm tra đổi hướng này và thêm hoặc xóa rcat khi cần.
Khi cần thiết, mức độ khoá trang sẽ được tự động phát hiện, mô tả và phân loại.

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}}}}
Trang này là một trang đổi hướng. Những thể loại sau được dùng để theo dõi và giám sát trang đổi hướng này:
  • Important – Please Read! This template should not be applied without parameters by bot nor by any automated or semi-automated process. It should not be used without parameters unless you want to learn how to categorize redirects. For editors who want to learn how to categorize redirects, this template is a learning tool. 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!
  • Sắp xếp đa dạng: Nếu bạn cần trợ giúp để xác định thể loại phù hợp, thì trang đổi hướng này sẽ nằm trong Thể loại:Trang đổi hướng khác. Người theo dõi thể loại đó sẽ kiểm tra đổi hướng này và thêm hoặc xóa rcat khi cần.

Bản mẫu:R printworthy

Khi cần thiết, mức độ khoá trang sẽ được tự động phát hiện, mô tả và phân loại.

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

Liên quan