Difference between revisions of "Template:Editnotice pagename/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Amalthea
(Attempted update, with new editnotice load system for a number of namespaces)
 
imported>Amalthea
(replace NAMESPACEID with NAMESPACENUMBER -- magic work does the exact same work, if no parameter is given.)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#switch:{{NAMESPACEID}}
+
{{#switch:{{NAMESPACENUMBER}}
 
 
<!--Main, Talk, File, MediaWiki, Help, Help talk, Category, Category talk live in Template:Editnotices/ -->
 
 
|0|1|6|8|12|13|14|15=Template{{#ifeq:{{lc:{{{1|}}}}}|talk|<nowiki> </nowiki>talk}}:Editnotices/{{FULLPAGENAME}}
 
|0|1|6|8|12|13|14|15=Template{{#ifeq:{{lc:{{{1|}}}}}|talk|<nowiki> </nowiki>talk}}:Editnotices/{{FULLPAGENAME}}
 
+
|4|5|7|9|10|11|100|101=MediaWiki{{#ifeq:{{lc:{{{1|}}}}}|talk|<nowiki> </nowiki>talk}}:Editnotice-{{NAMESPACENUMBER}}-{{#titleparts:{{PAGENAME}}|1}}{{
<!--Wikipedia, Wikipedia talk, File talk, MediaWiki talk, Template, Template talk, Portal, Portal talk live in MediaWiki:Editnotice-ID-PAGE -->
 
|4|5|7|9|10|11|100|101=MediaWiki{{#ifeq:{{lc:{{{1|}}}}}|talk|<nowiki> </nowiki>talk}}:Editnotice-{{NAMESPACEID}}-{{#titleparts:{{PAGENAME}}|1}}{{
 
 
   #if:{{#titleparts:{{PAGENAME}}|1|2}} | -{{#titleparts:{{PAGENAME}}|1|2}}{{
 
   #if:{{#titleparts:{{PAGENAME}}|1|2}} | -{{#titleparts:{{PAGENAME}}|1|2}}{{
 
     #if:{{#titleparts:{{PAGENAME}}|1|3}} | -{{#titleparts:{{PAGENAME}}|1|3}}
 
     #if:{{#titleparts:{{PAGENAME}}|1|3}} | -{{#titleparts:{{PAGENAME}}|1|3}}
 
     }}
 
     }}
 
   }}
 
   }}
 
<!--User, User talk can have one in the base subpage, or of course in MediaWiki space
 
 
|2|3={{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}
 
|2|3={{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}
  <!--base subpage-->
+
      |{{FULLPAGENAME}}/Editnotice
  |{{FULLPAGENAME}}/Editnotice
+
      |MediaWiki{{#ifeq:{{lc:{{{1|}}}}}|talk|<nowiki> </nowiki>talk}}:Editnotice-{{NAMESPACENUMBER}}-{{#titleparts:{{PAGENAME}}|1}}
  <!--MediaWiki version. Copy paste for now, is going to change soon (hopefully)-->
+
      {{#if:{{#titleparts:{{PAGENAME}}|1|2}} | -{{#titleparts:{{PAGENAME}}|1|2}}{{
  |MediaWiki{{#ifeq:{{lc:{{{1|}}}}}|talk|<nowiki> </nowiki>talk}}:Editnotice-{{NAMESPACEID}}-{{#titleparts:{{PAGENAME}}|1}}{{
+
        #if:{{#titleparts:{{PAGENAME}}|1|3}} | -{{#titleparts:{{PAGENAME}}|1|3}}
  #if:{{#titleparts:{{PAGENAME}}|1|2}} | -{{#titleparts:{{PAGENAME}}|1|2}}{{
+
        }}
    #if:{{#titleparts:{{PAGENAME}}|1|3}} | -{{#titleparts:{{PAGENAME}}|1|3}}
+
      }}
    }}
+
    }}
  }}
 
 
}}
 
}}
 +
<noinclude>
 +
{{documentation}}
 +
</noinclude>

Latest revision as of 06:53, 16 September 2019

MediaWiki:Editnotice-10-Editnotice pagename-sandbox

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

This is the {{editnotice pagename}} meta-template.

It returns the full pagename for the editnotice of the current page. It works both for subject pages such as articles and for their talk pages.

{{editnotice fullpagename}} redirects here and can be used as an alternative name for this template.

If you instead need the talkpage name for the editnotice then use {{editnotice talkpagename}}.

Usage

This template can be used without any parameters and automatically outputs a proper formatted editnotice page address. Like this:

{{editnotice pagename}}

Which outputs the pagename of the editnotice for this page itself:

Template:Editnotices/Page/Template:Editnotice pagename/sandbox

This can for instance be used to produce a link to the editnotice for the current page. Like this:

[[{{editnotice pagename}}]]
Template:Editnotices/Page/Template:Editnotice pagename/sandbox

This template works for all editnotices.

Talk page of edit notice

Use the following to produce the talk page of the edit notice template:

{{editnotice pagename|talk}}

Note: this does not work on User or User talk pages because these edit notices do not have talk pages.

Specify the page

To get the page name of the edit notice of a different page, use the |page= parameter. For example:

{{editnotice pagename|page=Sausage}}

produces: Template:Editnotices/Page/Sausage

{{editnotice pagename|page=User:Example}}

produces: User:Example/Editnotice

{{editnotice pagename|talk|page=Bacon}}

produces: Template talk:Editnotices/Page/Bacon

See also