साचा:हे एक पुनर्निर्देशन आहे/doc

विकिपीडिया, मुक्‍त ज्ञानकोशातून

This template may be used to add from one to seven appropriate redirect category (rcat) templates to redirects. Additionally, this template automatically senses, describes and categorizes protection levels. A third important function is to help editors learn more about redirect categorization by use of the manifold sort. For more information, see the page below and follow the boldface category link above.

Purpose[संपादन]

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.

Like the Redirect category shell template, this 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 section below.

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 १] [Printworthiness note १]

This template can categorize and display the text (with parameters if needed) of from 1 to 7 rcats.

Usage[संपादन]

Used by itself with no parameters, for example, {{This is a redirect}}, the template will appear as it does at the top of this page, and the redirect will populate वर्ग:Miscellaneous redirects. That category will also be populated if the first parameter is left empty while rcats occupy the second, third, and so on. 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 from one to seven different redirect category (rcat) templates. The choices for editors are listed at Wikipedia:Template messages/Redirect pages both alphabetically and by function. Any of those rcats may be used either with their full name, e.g., R from alternative language, or with the omission of the first "R", as in from alternative language. Aliases (usually shortcut redirects) of any of the listed rcats may also be used and will be found in each rcat's documentation.

The seven "main" parameters may be used as follows:

{{This is a redirect
 |1=(rcat name)
 |2=(second rcat name)
 |3=(third rcat name)
 |4=(fourth rcat name)
 |5=(fifth rcat name)
 |6=(sixth rcat name)
 |7=(seventh rcat name)
}}

As with all templates that have unnamed (numbered) parameters, the numbers and equal signs may be omitted. The above can be further condensed by typing everything on the same line:

{{This is a redirect|(rcat name)|(second rcat name)|(third rcat name)|(fourth rcat name)|(fifth rcat name)|(sixth rcat name)|(seventh rcat name)}}

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. The next example that shows an empty first parameter is one time that the sequence becomes important.

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

#REDIRECT [[(target page name)]]

{{This is a redirect||from short name|unprintworthy}}
Note the double pipe between "redirect" and "from" above, which indicates an empty first parameter. Leave the first parameter empty to sort a redirect to वर्ग:Miscellaneous redirects in addition to other 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: {{This is a redirect|from move|to section|printworthy}}
See also: section titled Mbox note below.

Parameters[संपादन]

The main parameters, one through seven, are for redirect categorization templates (rcats) themselves. Apart from parameter |e0= ("e-zero"), which provides an italicized TOP note when needed, and parameters |e1= through |e7=, which have been deprecated, other parameters may be used as follows:  This template transcludes any template that begins with "R " (all rcats begin with "R ") by using the rest of that template's text. For example:

{{This is a redirect|from airport code}}

...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 वर्ग: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 page is actually saved.

If a template beginning with "R " is not found, for example, {{This is a redirect|italic title}}, then the transcluded template is whatever template that has the same title as the exact text given. In the above example, the {{Italic title}} template would be transcluded and would italicize the title of the redirect. This also means that:

{{This is a redirect|R from airport code}}
produces the exact same result as:
{{This is a redirect|from airport code}} (it works with or without the leading "R ").

From one to seven templates can be transcluded. Parameter |e0= can provide a hatnote, and parameters |e1= through |e7= have been deprecated.

Rcat parameters[संपादन]

This template no longer accepts individual rcat parameters. If rcat parameters are needed, then use the {{Rcat shell}} template instead.

To clarify, this template's parameters, |p#= and |n#=, have been deprecated and should no longer be used. When the Rcat shell template is used, each rcat may pass any of its parameters with no concern for its position in the shell template.

Deprecated parameters[संपादन]

The |to= parameter in this template that was used with {{R from alternative language}} has been deprecated. This template's wiki markup that invokes the |to=, |p#= and |n#= parameters, as well as the code for the |e1= thru |e7= parameters, should stay in this template and not be removed until and unless all of the tagged redirects that use this template with those parameters have been modified to use the Rcat shell template. If any of these parameters are removed from this template's code, many redirects would be broken.

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:

{{This is a redirect}}...

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 [[(target page name)]]

{{This is a redirect||from subtopic|printworthy}}

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 and magic words within it as parameters. 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 Redr template is {{Italic title}} and its shortcut {{ital}} to denote titles that should be formatted 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 template in the following manner:

{{This is a redirect|from move|from alternative name|Italic title|DEFAULTSORT:Hobbit, The}}

Note that curly brackets should not be used within this template.

Footnotes[संपादन]

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 This is a redirect 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.
    Correct:
    #REDIRECT [[(target page)]]
    
    {{This is a redirect||unprintworthy}}
    
    Not correct:
    #REDIRECT [[(target page)]] {{This is a redirect||unprintworthy}}
    
    A blank line is usually placed between the redirect target and this template to make the Edit screen easier to read.

Printworthiness note

  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 the template. For example, if a redirect is tagged with:
    {{This is a redirect|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:

    {{This is a redirect|from ambiguous term|unprintworthy}}
    

    ...which produces:

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

हेही बघा[संपादन]