Template:Redirect category shell/doc

From Qualitipedia
Jump to navigation Jump to search

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 and categorizes protection levels. For more information, see the page below and follow the "Manifold sort" 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.
[Mbox note 1] [Printworthiness note 1]

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

Usage

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 more simply:

{{Redirect category shell|
{{rcat 1}}
{{rcat 2}}
{{rcat 3}}
{{rcat N}}
}}

"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.

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 Category:Miscellaneous redirects will be populated:

{{Redirect category shell||
{{rcat 1}}
{{rcat 2}}
{{rcat 3}}
{{rcat N}}
}}

This leaves the first parameter empty, and editors who monitor the Miscellaneous redirects category will come to the redirect and check/add/subtract rcats as necessary.

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}}
}}
Note the double pipe after "shell" above, which indicates an empty first parameter. Leave the first parameter empty to sort a redirect to Category: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 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.

Test notes

This is still undergoing tests. The existing This is a redirect template can remain in its present form as, in some cases, a simpler choice for editors. This new template can also be used for future tagging of redirects. It needs only one parameter, |1= for as many rcat templates that are needed. The following still needs work:

Embed flaw

  • In order to see the same textual format that appears in the This is a redirect template, the |embed=yes parameter must be used in each rcat, e.g.,
{{Redirect category shell|
{{R from move|embed=yes}}
{{R from alternative spelling|embed=yes}}
{{R printworthy|embed=yes}}
}}
And yes, I do consider this a "flaw", because editors should not have to add a redundant parameter each time they add an rcat to this template.

Testing has confirmed that the embed flaw can be eliminated. To do so entails a major edit to each and every rcat template. An example of the needed change can be viewed at {{R from incorrect name/sandbox}}.

Notes

Mbox note

  1. When the wikimarkup code 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-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 readability guide, and be sure to preview your edits – all your edits.
    Template:Green
    #REDIRECT [[(target page)]]
    
    {{Redirect category shell||
    {{R unprintworthy}}
    }}
    
    Not correct:
    #REDIRECT [[(target page)]] {{Redirect category shell||{{R unprintworthy}}}}
    
    A blank line is usually placed between the redirect target and this template to make the Edit screen easier to read.

Printworthiness note Template:See also

  1. Where the printworthiness of a mainspace redirect is concerned, there are three kinds of rcats:
    1. those that populate the Printworthy redirects category by default,
    2. those that populate the Unprintworthy redirects category by default, and
    3. 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 {{R printworthy}} or {{R unprintworthy}} is listed as an rcat within this template. For example, if a redirect is tagged with:
    {{Redirect category shell|
    {{R from ambiguous term}}
    }}
    

    ...then the hidden categories populated will be Redirects from ambiguous pages and Unprintworthy redirects, and 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:

    If an editor wants the printworthiness category to appear in the mbox, then the redirect must be tagged as follows:

    {{Redirect category shell|
    {{R from ambiguous term}}
    {{R unprintworthy}}
    }}
    

    ...which produces:

    Only then will the printability, printworthy or unprintworthy, be described within this template's mbox on the redirect page.

See also