साँचा:This is a redirect

मुक्त ज्ञानकोश विकिपीडिया से
Jump to navigation Jump to search
परिचय का प्रतीक साँचा परिचय[देखें] [संपादन] [इतिहास] [पर्ज]

This template may be used to add from one to seven 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 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 removed, then the protection-related rcats and category(ies) will also be (automatically) removed from the redirect.
[Mbox note 1] [Printworthiness note 1]

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 page: Category: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 page:

Category: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-based 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 may be used to give an explanation of an editor's choice of category(ies), 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 page:

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 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. Parameters |e0= through |e7= are used for optional explanations that may justify the redirect or clarify why a redirect category applies for each particular redirect. The |e#= parameter is numbered according to which rcat it explains – if it explains the first rcat, then |e1= is used, or if it explains the sixth rcat, then |e6= is used. Again the |e#= parameters are optional and, when used, their sequence must coincide with the rcats they explain:

explanation parameters[संपादित करें]

{{This is a redirect
  |e0=See '''{{-r|(Other redirect title)}}''' for printworthy redirect.
 |from airport code
  |e1=* ''This airport code has been discontinued.''
 |from ambiguous page
  |e2=* '''Note:'''  ''The ambiguity is easily disambiguated.''
 |from London bus route
  |e3=* (This bus route is to and from Maidenhead.)
 |from Unicode
  |e5=* ''Up to '''eight''' of these '''{{para|e#}}''' parameters may be used – the '''{{para|e0}}''' as a '''TOP note''' as well as one {{para|e#}} parameter for each different rcat.''


Notes: The above is only for illustration, as no single redirect would be tagged by all of these rcats together. Also, the "Template protected" may appear in this case only because this This is a redirect template page itself is template protected. In addition, note that an asterisk (*) may be used to indent and bullet the explanations.

Rcat parameters[संपादित करें]

In addition to this template's own seven parameters that allow it to hold from one to seven different rcats, it accepts most or all of the parameters that rcats accept. Two rcat parameters, when needed, will work in this template:

  • one unnamed parameter, |1=, from each rcat (|p#= in this template), and
  • a second parameter from each rcat, the |2= parameter (|n#= in this template).

This template will accept two optional unnamed parameters for each individual rcat used. An example of one parameter used follows:

{{This is a redirect|from plural|p1=printworthy}}

This subdues the Unprintworthy redirects category to which {{R from plural}} defaults and populates the Printworthy redirects category instead. This template will hold up to seven rcats, so there are also seven respective "p" parameters, p1, p2, p3, ... p7. Which position the rcat holds will determine the "p" number to use, so the sequence is again very important:

{{This is a redirect|from move|mod|nick|ralterlang|p4=en|rcon|from plural|p6=printworthy}}

In the above example, "from plural" ({{R from plural}}) is the sixth and final rcat, so "p6" is used to make the redirect "printworthy". Since "ralterlang" ({{R from alternative language}}) holds the 4th position, "p4" is used for the ISO 639 code of the source language, in this case  


for English.

Additionally, this template will accept the |2= parameter (if there is one) from an rcat. This template uses |n#= to represent an rcat's |2= parameter. 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:

{{This is a redirect|from misspelling|p1=(correct spelling if needed)|n1=printworthy}}

In this case |p1= is the correct spelling (used only if the target of the redirect is not the correct spelling). The |n1= parameter can be used when a second rcat parameter is added. 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 page: Category:Printworthy redirects instead. As with the |p#= parameters, there are seven |n#= parameters, n1, n2, n3, ... n7, one for each of the seven positions in this template. Just as with the |e#= and |p#= parameters, the sequence is important, so if an edit changes the rcat sequence, and the letter parameters have been previously added, then the |e#=, the |p#= and the |n#= parameters must be checked to ensure they still correspond to the correct rcats:

{{This is a redirect|from move|from misspelling|p2=(correct spelling)|n2=printworthy|printworthy}}

If an editor wants to add the {{R from modification}} rcat to the above, and it is added after the "p" and "n" parameters, then nothing else needs to be changed:

{{This is a redirect|from move|from misspelling|p2=(correct spelling)|n2=printworthy|from modification|printworthy}}

If, however, that rcat is added "in front of" the {{R from misspelling}} rcat, then the "p" and "n" parameters must also be edited:

{{This is a redirect|from move|from modification|from misspelling|p3=(correct spelling)|n3=printworthy|printworthy}}

An example of a "printworthy misspelling" can be found at template {{R from misspelling}}.

Additional notes[संपादित करें]

The |to= parameter in this template that was used with {{R from alternative language}} has been deprecated. Use the |n#= parameter instead as follows:

{{This is a redirect|from alternative language|p1=ja|n1=es}}

The above code will sort the redirect into two categories:

This template's wiki markup that invokes the |to= parameter should stay in place and not be removed until the remaining redirects that use that parameter in this template have been modified.

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:

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

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

इन्हें भी देखें: Wikipedia:Printability
  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.

See also[संपादित करें]

साँचा:R template index