m equal sign added for consistency, although it seems to work just as well without |
Paine Ellsworth (talk | contribs) simplify |
||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq:{{#invoke:redirect|isRedirect|{{FULLPAGENAME}}}}|yes|</includeonly>{{Mbox |
|||
{{#switch:{{SUBPAGENAME}} |
|||
|core= |
|||
|doc=<includeonly> |
|||
|sandbox=</includeonly> |
|||
|testcases= |
|||
|{{#switch:{{FULLPAGENAME}} |
|||
|Template:Redirect template= |
|||
|Template:This is a redirect= |
|||
|Wikipedia:Sandbox= |
|||
|Wikipedia:Template messages/Redirect pages= |
|||
|Wikipedia:WikiProject Scouting/Templates= |
|||
|{{#switch:{{PAGENAME}} |
|||
|R from ISO 4= |
|||
|R from ISO 639 code= |
|||
|R from ISO 3166 code= |
|||
|R from ISO 15924 code= |
|||
|R from acronym= |
|||
|R to acronym= |
|||
|R from adjective= |
|||
|R from adverb= |
|||
|R from airport code= |
|||
|R from album= |
|||
|R from alternative military designation= |
|||
|R from alternative transliteration= |
|||
|R from animal= |
|||
|R to article without mention= |
|||
|R from ATC code= |
|||
|R from ATCvet code= |
|||
|R from birth name= |
|||
|R from book= |
|||
|R from brand name= |
|||
|R from bus route= |
|||
|R from calling code= |
|||
|R from Canadian settlement name= |
|||
|R from case citation= |
|||
|R from catchphrase= |
|||
|R from city and province= |
|||
|R from city and state= |
|||
|R from code= |
|||
|R comics from alternative name= |
|||
|R comics to list entry= |
|||
|R comics from merge= |
|||
|R comics naming convention= |
|||
|R comics with possibilities= |
|||
|R comics from related word= |
|||
|R comics to section= |
|||
|R from common noun= |
|||
|R to decade= |
|||
|R from domain name= |
|||
|R from E number= |
|||
|R from eponym= |
|||
|R from fictional character= |
|||
|R from fictional element= |
|||
|R from fictional place= |
|||
|R from file extension= |
|||
|R from file metadata link= |
|||
|R from filename= |
|||
|R from film= |
|||
|R from former name= |
|||
|R to former name= |
|||
|R from former Swiss municipality= |
|||
|R from gender= |
|||
|R from gene symbol= |
|||
|R from gerund= |
|||
|R from given name= |
|||
|R from Greek letter organization letters= |
|||
|R from E2 symmetry= |
|||
|R from H2 symmetry= |
|||
|R from S2 symmetry= |
|||
|R from highway= |
|||
|R from highway in region= |
|||
|R from highway in region without possibilities= |
|||
|R from IMO number= |
|||
|R from imprint= |
|||
|R from initialism= |
|||
|R to initialism= |
|||
|R from Java package name= |
|||
|R to joint biography= |
|||
|R to list entry= |
|||
|R from London bus route= |
|||
|R from London place name= |
|||
|R from manufacturer's designation= |
|||
|R from married name= |
|||
|R from mathematical symbol or equation= |
|||
|R ME from alternative name= |
|||
|R ME from alternative spelling= |
|||
|R ME without diacritics= |
|||
|R ME from duplicated article= |
|||
|R ME from former name=<!-- 77 count (no more than 100 entries in each switch!) --> |
|||
|{{#switch:{{PAGENAME}} |
|||
|R ME to list entry= |
|||
|R ME with possibilities= |
|||
|R ME to section= |
|||
|R from military designation= |
|||
|R from molecular formula= |
|||
|R from monotypic taxon= |
|||
|R to monotypic taxon= |
|||
|R from name and country= |
|||
|R from numerals= |
|||
|R to numerals= |
|||
|R from NYC bus route= |
|||
|R from other capitalisation= |
|||
|R from person= |
|||
|R from personal name= |
|||
|R plants with possibilities= |
|||
|R from plural= |
|||
|R to plural= |
|||
|R from postal abbreviation= |
|||
|R from postal code= |
|||
|R from predecessor company name= |
|||
|R printworthy= |
|||
|R from product= |
|||
|R from proper noun= |
|||
|R from pseudonym= |
|||
|R from railroad name with ampersand= |
|||
|R to related topic= |
|||
|R from relative= |
|||
|R from reporting name= |
|||
|R from school= |
|||
|R from scientific abbreviation= |
|||
|R from scientific name= |
|||
|R from alternative scientific name= |
|||
|R to scientific name= |
|||
|R scouting from merge= |
|||
|R from slogan= |
|||
|R from song= |
|||
|R from sort name= |
|||
|R from specific geographic name= |
|||
|R from spouse= |
|||
|R from stock symbol= |
|||
|R from stylization= |
|||
|R from subsidiary title= |
|||
|R from subtopic= |
|||
|R to subtopic= |
|||
|R from surname= |
|||
|R to Swiss municipality 2L= |
|||
|R to Swiss municipality (canton)= |
|||
|R to Swiss municipality (, Switzerland)= |
|||
|R from symbol= |
|||
|R from systematic abbreviation= |
|||
|R from systematic name= |
|||
|R to systematic name= |
|||
|R from technical name= |
|||
|R to technical name= |
|||
|R from telephone number= |
|||
|R to template namespace= |
|||
|R from top-level domain= |
|||
|R from trademark= |
|||
|R from trade name= |
|||
|R to TV episode list entry= |
|||
|R from Twitter username= |
|||
|R from tzid= |
|||
|R from UK postcode= |
|||
|R from Unicode= |
|||
|R unprintworthy= |
|||
|R from US military aircraft designator= |
|||
|R from US postal abbreviation= |
|||
|R from variant military designation= |
|||
|R from verb= |
|||
|R from Wade–Giles romanization= |
|||
|R from work= |
|||
|R from writer= |
|||
|R from year=<!-- 73 count (no more than 100 entries in each switch!) --> |
|||
|{{Mbox |
|||
| type = content |
| type = content |
||
| image = [[File:Stop hand orange.svg|50px]] |
| image = [[File:Stop hand orange.svg|50px]] |
||
| text = {{Error|The above [[WP:RCAT|rcat]] should only be used to categorize redirects that are {{#ifeq:{{{3}}}|outside|outside|in}} the ''{{{1}}}'' namespace{{#if:{{{2|}}}|{{nbsp}}{{#if:{{{3|}}}|and|or}} the ''{{{2}}}'' namespace.|.}}}} |
| text = {{Error|The above [[WP:RCAT|rcat]] should only be used to categorize redirects that are {{#ifeq:{{{3}}}|outside|outside|in}} the ''{{{1}}}'' namespace{{#if:{{{2|}}}|{{nbsp}}{{#if:{{{3|}}}|and|or}} the ''{{{2}}}'' namespace.|.}}}} |
||
}}<includeonly>[[Category:Pages with templates in the wrong namespace]]</includeonly> |
}}<includeonly>[[Category:Pages with templates in the wrong namespace]]}}</includeonly><noinclude> |
||
{{documentation}} |
{{documentation}} |
||
</noinclude> |
</noinclude> |
Revision as of 08:38, 21 December 2015
![](https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
Usage
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
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
{{Ombox
| type = notice
| text = Example text.
}}<includeonly>{{Help other|[[Category:Example category]]|{{Incorrect redirect template|[[Help:help|help]]}}}}</includeonly>
- produces:
- 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
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
{{Ombox
| type = notice
| text = Example text.
}}<includeonly>{{Help other|[[Category:Example category]]|{{Incorrect redirect template|[[Help:help|help]]|[[WP:Mainspace|main]]}}}}</includeonly>
- produces:
- 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
This parameter is used when the text should read "...should only be used to categorize redirects that are outside ..." (instead of "in" ...).
Example 3
{{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:
- 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:
- Also note that "or" is changed to "and" (help namespace "and" the main namespace).
See also
- {{Incorrect namespace}}
- {{Single namespace}}
Recent Comments