Difference between revisions of "Template:Editnotice subpages"

From blackwiki
Jump to navigation Jump to search
imported>Amalthea
imported>Amalthea
(add {{{on base}}} parameter. Set to "no" to show it only on subpages of {{FULLROOTPAGENAME}}/{{{1}}}, not on that page itself.)
Line 4: Line 4:
  
 
-->{{#if:
 
-->{{#if:
     {{#ifeq: {{#titleparts:{{FULLPAGENAME}}|  0 | 2 }} | {{{1}}} | y <!--test s1/s2/s3/s4/s5/s6-->
+
     {{#ifeq:{{lc:{{{on base|y}}}}}|no||{{#ifeq: {{#titleparts:{{FULLPAGENAME}}|  0 | 2 }} | {{{1}}} | y }} <!--test s1/s2/s3/s4/s5/s6; only if {{{on base}}}!=no-->
 
   }}{{#ifeq: {{#titleparts:{{FULLPAGENAME}}| -1 | 2 }} | {{{1}}} | y <!--test s1/s2/s3/s4/s5-->
 
   }}{{#ifeq: {{#titleparts:{{FULLPAGENAME}}| -1 | 2 }} | {{{1}}} | y <!--test s1/s2/s3/s4/s5-->
 
   }}{{#ifeq: {{#titleparts:{{FULLPAGENAME}}| -2 | 2 }} | {{{1}}} | y <!--test s1/s2/s3/s4-->
 
   }}{{#ifeq: {{#titleparts:{{FULLPAGENAME}}| -2 | 2 }} | {{{1}}} | y <!--test s1/s2/s3/s4-->
Line 13: Line 13:
 
   | {{Template:Editnotices/Group/{{FULLROOTPAGENAME}}/{{{1}}}}}
 
   | {{Template:Editnotices/Group/{{FULLROOTPAGENAME}}/{{{1}}}}}
 
   | <!-- else: no match -->
 
   | <!-- else: no match -->
}}
+
}}<noinclude>
 +
<!-- Place categories and interwiki links on the documentation subpage, please -->
 +
{{pp-template}}
 +
{{documentation}}
 +
</noinclude>

Revision as of 15:02, 25 May 2009

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

Template loads the group editnotice for one of its existing subpages, specified in {{{1}}}, the first unnamed parameter.

Example: {{Editnotices/Group/Wikipedia:In the news}} is the group editnotice for Wikipedia:In the news. It makes a call to {{Editnotice subpages}} with |1=Candidates, which loads {{Editnotices/Group/Wikipedia:In the news/Candidates}} for its subpages.

Usage

  • {{Editnotice subpages|subpage}}

or

  • {{Editnotice subpages|subpage/subpage2}}

etc.

Parameters

  • |1= supports loading subpage group editnotices with a maximum depth of 6.
  • If |on base=no, the subpage group editnotice is shown only on subpages of {{FULLROOTPAGENAME}}/{{{1}}}, not on that page itself.