Template:R to user namespace and Template:R to user namespace/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
imported>Paine Ellsworth
include error check for targets that are not in user namespace – see Template talk:R to project namespace#Template-protected edit request on 15 January 2022 for discussion
 
imported>Paine Ellsworth
normalize
 
Line 1: Line 1:
<noinclude>{{This is a redirect/rcat}}
<!--
</noinclude>{{Redirect template
 
  |id=R to user namespace
  Add your experimental template code here.
  |name=[[:Category:Redirects to user namespace|From outside userspace]]
 
  |from=a page outside the [[WP:User pages|user namespace]]
--><noinclude>
  |to=a user page (not to a user ''talk page'')
{{Documentation}}
  |info=If this redirect targets a user talk page, then use {{tlx|R to talk page}} instead.  This redirect page ''must be '''outside'''<nowiki />'' the user namespace.  If this redirect is in the user namespace, then instead of the expected category, it will populate '''{{cat|Pages with templates in the wrong namespace}}'''.
  |printworthy=no
}}<includeonly>{{User other|{{Incorrect redirect template|[[WP:User pages|user]]||outside}}|[[Category:Redirects to user namespace]]}}{{#ifeq: {{BASEPAGENAME}}|R to user namespace||{{#ifeq: {{NAMESPACE:{{#invoke:redirect|main|{{FULLPAGENAME}}}}}}|{{ns:2}}||{{info|image=Stop hand nuvola.svg|{{error|The above template is being used incorrectly. Please remove it from this redirect.}}}}[[category:Pages with incorrectly transcluded templates]]}}}}</includeonly><noinclude>
<!-- Place categories on /doc subpage; interwikis go to Wikidata. -->
{{documentation}}
</noinclude>
</noinclude>