Fyrimynd:This is a redirect/doc
Hetta er ein dokumentatión undirsíða til Fyrimynd:This is a redirect. Hon inniheldur kunning um nýtsluna, bólkar og um annað innihald, ið ikki er við í uppruna fyrimynd síðuni. |
Henda fyrimynd verður nýtt á nógvum síðum síðum, so broytingar á síðuni verða lagdar til merkis víða. Vinarliga royn broytingarnar á tíni egnu sandkassa-síðu ella á /sandbox ella /testcases undirsíðum hjá fyrimyndini, ella í einari brúkaraundirsíðu, og umhugsa at kjakast um broytingar á kjaksíðuni áðrenn tú goymir broytingarnar á sjálvari fyrimyndini. |
Henda fyrimyndin eigur ikki at verða útskift heldur ikki til at frámerkja soft redirects. |
Purpose
[rætta wikitekst]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]
Usage
[rætta wikitekst]Used by itself with no parameters (for example {{This is a redirect}}
or simply {{Redr}}
), the template will appear as it does at the top of this page, and the redirect will populate Bólkur: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. Editors who monitor the Miscellaneous redirects category will check these on an equable basis and 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 up 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. The aliases (usually shortcut redirects) of any of the listed rcats may also be used, e.g., Ralterlang or in lower case, ralterlang. An rcat's aliases may be found in its documentation. So in the case of a redirect from a different language, the three basic choices are:
{{This is a redirect|R from alternative language}} {{This is a redirect|from alternative language}} {{This is a redirect|ralterlang}}
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; this indicates an empty first parameter and will populate Bólkur:Miscellaneous redirects in addition to the Redirects from short names and Unprintworthy redirects categories.
Generally for good readability on the Edit screen, this template is placed on the third line of the redirect as follows:
#REDIRECT [[(target page name)]]
(please leave this line blank for emphasis and ease of reading by editors)
{{This is a redirect|from move|to section|printworthy}}
- See also: section titled Mbox-based below.
Parameters – general usage
The main parameters, one through seven, are for redirect categorization templates (rcats) themselves. Apart from parameter e0= (that is a zero, not a letter), which provides an italicized TOPnote when needed, and parameters e1= through e7=, which may be used to clarify the editor's choice of category(ies), other parameters may be used as follows. This template transcludes whatever other template begins with "R ", followed by the parameter's text. For example:
{{This is a redirect|from airport code}}
...uses the rcat {{R from airport code}} and produces:
This page is a redirect:
Fyrimynd:This is a redirect/collapse topFyrimynd:From airport code Fyrimynd:This is a redirect/collapse bottom
|
If a template beginning with "R " is not found (for example, {{R R from airport code}} does not exist), then the transcluded template is whatever template that has the same title as the exact text given, so {{This is a redirect|R from airport code}}
produces the same result as {{This is a redirect|from airport code}}
(it will work with or without the leading "R").
Up to seven rcat templates can be transcluded. Parameters e0 through e7 are optional explanations, which may be used to justify the redirect and to clarify why a redirect category applies in each particular case.
Example
[rætta wikitekst]{{This is a redirect |e0=This redirect is needed to aid searches. |from airport code |e1=* ''This airport code is rarely used anymore.'' |from ambiguous page |e2=* '''Note:''' ''The ambiguity is disambiguated.'' |from London bus route |e3=* (uhm, OK, this is not really a London bus route.) |from Unicode |unprintworthy |e5=''Up to '''eight''' of these '''e#''' parameters may be used – the '''e0''' as a '''TOPnote''' as well as one for each different rcat.'' }}
produces:
This page is a redirect:
Fyrimynd:This is a redirect/collapse topNote: This redirect is needed to aid searches.Fyrimynd:From airport code
Fyrimynd:This is a redirect/collapse bottom
|
Rcat parameters
[rætta wikitekst]In addition to this template's own seven parameters that allow it to hold up to seven different rcats, it accepts most or all of the parameters that rcats accept. Two types of rcat parameters will work in this template:
- one unnamed parameter from each rcat, and
- a second parameter from each rcat – the
2=
parameter.
This template will accept one optional unnamed parameter for each individual rcat used:
{{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:
{{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 en
for English.
Additionally, this template will accept the 2=
parameter (if there is one) from each rcat. This template uses n#=
for any 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:
{{Redr|from misspelling|p1=(correct spelling)|n1=printworthy}} Note: if used by itself the template would appear like this: {{R from misspelling|(correct spelling)|printworthy}}
"Redr" is an alias or shortcut for this template and "p1" is the unnamed parameter described above, in this case the correct spelling. The "n1" parameter can be used when a second rcat parameter, 2=
, is needed. 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" sort, and the redirect will populate Bólkur: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 ("typo" is an alias/shortcut for "from misspelling", as in "{{Redr|typo}}
"):
{{Redr|move|mod|typo|p3=(correct spelling)|n3=printworthy}}
An example of a "printworthy misspelling" can be found at {{R from misspelling}}.
Additional notes
[rætta wikitekst]The "to" parameter in this template that was used with {{R from alternative language}} has been deprecated. Use the n#
parameter instead as follows:
{{Redr|ralterlang|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
[rætta wikitekst]There are two ways to sort a redirect into the Miscellaneous redirects category. When the Redr template is used without any rcats, it will perform the miscellaneous sort:
{{Redr}}
...
This page 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)]] {{Redr||printworthy}}
Monitors of the Miscellaneous redirects category will check the redirect, add other rcats if needed, and then exclude the empty first parameter by deleting one of the first two pipes.
Comparison
[rætta wikitekst]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.
Notes
[rætta wikitekst]Mbox note
- ↑ 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 (or Redr) 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)]] {{Redr||unprintworthy}}
- Not correct:
#REDIRECT [[(target)]] {{Redr||unprintworthy}}
- Never place this template on the first line after the redirect target; place it on the third line for readability.
Printworthiness note
- ↑ Where the printworthiness of a mainspace redirect is concerned, there are three kinds of rcats:
- those that populate the Printworthy redirects category by default,
- those that populate the 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.
{{Redr|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:
This page is a redirect: Fyrimynd:This is a redirect/collapse topFyrimynd:From ambiguous term/demo Fyrimynd:This is a redirect/collapse bottom
- For more information follow the category link(s).
If an editor wants the printworthiness category to appear in the mbox, then the redirect must be tagged as follows:
{{Redr|from ambiguous term|unprintworthy}}
...which produces:
This page is a redirect: Fyrimynd:This is a redirect/collapse topFyrimynd:From ambiguous term/demoFyrimynd:Unprintworthy Fyrimynd:This is a redirect/collapse bottom
- For more information follow the category link(s).
Only then will the printworthiness be described within this template's mbox on the redirect page.
See also
[rætta wikitekst]- {{Talk page of a redirect}}, an alternative to a redirect when a talk page has already been created
- Template:This is a redirect/code, original explanations of this template's early code
- Wikipedia:Protection policy, for questions related to this template's ability to detect protection levels
- Wikipedia:Template messages/Redirect pages, a functional and an alphabetical index of rcats
- WikiProject Redirect/Style guide