Difference between revisions of "Template:Draft article check/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Headbomb
(20)
imported>SD0001
(Syncing sandbox code with main template (sync-template-sandbox.js))
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#switch:{{NAMESPACE}}
+
{{#if:{{{demospace|}}}|On [[:{{#switch:{{{demospace}}}|Main=|#default={{{demospace|}}}:}}{{{1}}}]]:{{space}}}}<!--
 +
-->{{#switch:{{{demospace|{{NAMESPACE}}}}}
 
  |<!--Mainspace-->
 
  |<!--Mainspace-->
  |Talk  = {{#ifexist:Draft:{{PAGENAME}}|{{n.b.|20px}} There is a [[Wikipedia:Drafts|draft]] named [[Draft:{{PAGENAME}}|{{PAGENAME}}]].}}
+
|Main  = <!-- Should not currently be used in mainspace -->
 +
  |Talk  = {{#ifexist:Draft:{{{1|{{PAGENAME}}}}}|{{n.b.|20px}} There is a [[Wikipedia:Drafts|draft]] named [[Draft:{{{1|{{PAGENAME}}}}}|{{{1|{{PAGENAME}}}}}]].}}
 
  |Draft talk
 
  |Draft talk
  |Draft = {{#switch:{{#ifexist:{{PAGENAME}}|{{#ifeq:{{#invoke:redirect|isRedirect|{{PAGENAME}}}}|yes
+
  |Draft = {{#switch:{{#ifexist:{{{1|{{PAGENAME}}}}}|{{#ifeq:{{#invoke:redirect|isRedirect|{{{1|{{PAGENAME}}}}}}}|yes
 
     |Redirect
 
     |Redirect
 
     |Article
 
     |Article
Line 9: Line 11:
 
     |No
 
     |No
 
   }}
 
   }}
   |Article  = {{n.b.|20px}} There is already an article named [[{{PAGENAME}}]] in the [[WP:MAINSPACE|mainspace]].
+
   |Article  = {{n.b.|20px}} There is already an article named [[{{{1|{{PAGENAME}}}}}]] in the [[WP:MAINSPACE|mainspace]].
   |Redirect = {{n.b.|20px}} The page {{no redirect|{{PAGENAME}}}} in the [[WP:MAINSPACE|mainspace]] is currently a redirect to [[{{#invoke:redirect|main|{{PAGENAME}}}}]].
+
   |Redirect = {{n.b.|20px}} The page {{no redirect|{{{1|{{PAGENAME}}}}}}} in the [[WP:MAINSPACE|mainspace]] is currently a redirect to [[{{#invoke:redirect|main|{{{1|{{PAGENAME}}}}}}}]].
   |No      = {{n.b.|20px}} There currently is not an article named [[{{PAGENAME}}]] in the [[WP:MAINSPACE|mainspace]].
+
   |No      =
 +
  }}
 +
|User talk =
 +
|User = {{#switch:{{#ifexist:{{{1|{{SUBPAGENAME}}}}}|{{#ifeq:{{#invoke:redirect|isRedirect|{{{1|{{SUBPAGENAME}}}}}}}|yes
 +
    |Redirect
 +
    |Article
 +
    }}
 +
    |No
 +
  }}
 +
  |Article  = {{n.b.|20px}} There is already an article named [[{{{1|{{SUBPAGENAME}}}}}]] in the [[WP:MAINSPACE|mainspace]].
 +
  |Redirect = {{n.b.|20px}} The page {{no redirect|{{{1|{{SUBPAGENAME}}}}}}} in the [[WP:MAINSPACE|mainspace]] is currently a redirect to [[{{#invoke:redirect|main|{{{1|{{SUBPAGENAME}}}}}}}]].
 +
  |No      =
 
   }}
 
   }}
 
}}<noinclude>
 
}}<noinclude>

Latest revision as of 09:44, 8 March 2020

Template documentation[view] [edit] [history] [purge]

{{Draft article check}} is a template designed to alert editors to the existence of relevant articles or drafts.

Usage

{{Draft article check}} will give different results depending on which namespace it is used, and which corresponding article exist in mainspace/draft space

Namespace Message
Draft On Draft:Example:Template:Space (article)
On Draft:J Phys C:Template:Space (redirect)
Draft talk On Draft talk:Example:Template:Space (article)
On Draft talk:J Phys C:Template:Space (redirect)
in development
Main On Example:Template:Space (article)
On J Phys C:Template:Space (redirect)
Talk On Talk:Example:Template:Space (article)
On Talk:J Phys C:Template:Space (redirect)
User On User:Example:Template:Space (article)
On User:J Phys C:Template:Space (redirect)
User talk On User talk:Example:Template:Space (article)
On User talk:J Phys C:Template:Space (redirect)
Wikipedia On Wikipedia:Example:Template:Space (article)
On Wikipedia:J Phys C:Template:Space (redirect)
Wikipedia talk On Wikipedia talk:Example:Template:Space (article)
On Wikipedia talk:J Phys C:Template:Space (redirect)