Template:Incorrect redirect template
Jump to navigation
Jump to search
The above rcat should only be used to categorize redirects that are in the {{{1}}} namespace. |
This template should not be substituted. |
This template is used on many pages, so changes to it will be widely noticed. Please test any changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Please consider discussing changes on the talk page before implementing them. |
Usage[edit source]
This template is for use in other templates in conjunction with namespace detection. It adds pages to Category:Pages with templates in the wrong namespace. This template has been designed to ignore pages that are not redirects.
1st parameter[edit source]
The 1st parameter inserts text in the message to specify in which namespace the redirect in question should (or should not) be categorized.
Example 1[edit source]
{{Ombox | type = notice | text = Example text. }}<includeonly>{{Help other|[[Category:Example category]]|{{Incorrect redirect template|[[Help:help|help]]}}}}</includeonly>
- produces:
Example text. |
The above rcat should only be used to categorize redirects that are in the help namespace. |
- In the above example, transcluding the message box will categorize redirects in the help namespace into Category:Example category, and for pages outside the help namespace will produce this template's error message beneath the message box and populate Category:Pages with templates in the wrong namespace instead of Category:Example category.
2nd parameter[edit source]
The 2nd parameter inserts text in the message to specify a second namespace in which the redirect in question should (or should not) be categorized.
Example 2[edit source]
{{Ombox | type = notice | text = Example text. }}<includeonly>{{Help other|[[Category:Example category]]|{{Incorrect redirect template|[[Help:help|help]]|[[WP:Mainspace|main]]}}}}</includeonly>
- produces:
Example text. |
The above rcat should only be used to categorize redirects that are in the help namespace or the main namespace. |
- In the above example, transcluding the message box will categorize pages in the help namespace or the main namespace into Category:Example category, and for pages outside the help namespace or mainspace will produce this template's error message beneath the message box and populate Category:Pages with templates in the wrong namespace instead of Category:Example category.
3rd parameter[edit source]
This parameter is used when the text should read "...should only be used to categorize redirects that are outside ..." (instead of "in" ...).
Example 3[edit source]
{{Ombox | type = notice | image = [[File:Stop hand orange.svg|50px]] | text = Example text. }}<includeonly>{{Help other|[[Category:Example category]]|{{Incorrect redirect template|[[Help:help|help]]||outside}}}}</includeonly>
- Note: Two pipes together are used to yield an "empty" 2nd parameter.
- produces:
Example text. |
The above rcat should only be used to categorize redirects that are outside the help namespace. |
- In the above example, transcluding the message box will categorise pages outside the help namespace into Category:Example category, and for pages that are in the help namespace will produce this template's error message beneath the message box and populate Category:Pages with templates in the wrong namespace instead of Category:Example category. If a second namespace must be specified, then turn the empty 2nd parameter into a namespace link:
- Example 3.1
{{Ombox | type = notice | image = [[File:Stop hand orange.svg|50px]] | text = Example text. }}<includeonly>{{Help other|[[Category:Example category]]|{{Incorrect redirect template|[[Help:help|help]]|[[WP:Mainspace|main]]|outside}}}}</includeonly>
- produces:
Example text. |
The above rcat should only be used to categorize redirects that are outside the help namespace and the main namespace. |
- Also note that "or" is changed to "and" (help namespace "and" the main namespace).
See also[edit source]
- {{Incorrect namespace}}
- {{Single namespace}}
The above documentation is transcluded from Template:Incorrect redirect template/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |