Template:Namespace detect showall: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>WOSlinker
remove {{pp-template}} since included in {{documentation}}
m 1 revision imported
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{#switch:    <!-- Use the parameter -->
{{safesubst<noinclude />:#switch:    <noinclude><!-- Use the parameter --></noinclude>
   {{#switch:    <!-- Find out which parameter to use -->
   {{safesubst<noinclude />:#switch:    <noinclude><!-- Find out which parameter to use --></noinclude>
     {{lc:    <!--Lower case the result-->
     {{lc:    <noinclude><!--Lower case the result--></noinclude>
       <!--If no or empty "demospace" parameter then detect namespace-->
       <noinclude><!--If no or empty "demospace" parameter then detect namespace--></noinclude>
       {{#if:{{{demospace|}}}  
       {{safesubst<noinclude />:#if:{{{demospace|}}}
       | {{{demospace}}}
       | {{{demospace}}}
       | {{#if:{{{page|}}}  
       | {{safesubst<noinclude />:#if:{{{page|}}}
         | <!--Detect the namespace in the "page" parameter-->
         | <noinclude><!--Detect the namespace in the "page" parameter--></noinclude>
           {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
           {{safesubst<noinclude />:#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
           | talk
           | talk
           | {{SUBJECTSPACE:{{{page}}} }}  
           | {{SUBJECTSPACE:{{{page}}} }}
           }}
           }}
         | <!--No "demospace" or "page" parameters, so detect actual namespace-->
         | <noinclude><!--No "demospace" or "page" parameters, so detect actual namespace--></noinclude>
           {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
           {{safesubst<noinclude />:#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
           | talk
           | talk
           | {{SUBJECTSPACE}}  
           | {{SUBJECTSPACE}}
           }}
           }}
         }}
         }}
       }}
       }}
     }}
     }}
   <!-- Only one of the lines below will be executed -->
   <noinclude><!-- Only one of the lines below will be executed --></noinclude>
   <!-- Respecting empty parameters on purpose -->
   <noinclude><!-- Respecting empty parameters on purpose --></noinclude>
   | showall  = showall  <!-- "demospace=showall" -->
   | showall  = showall  <noinclude><!-- "demospace=showall" --></noinclude>
   | main        <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
   | main        <noinclude><!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""--></noinclude>
   |          = {{{main| {{{other|}}} }}}
   |          = {{{main| {{{other|}}} }}}
   | talk      = {{{talk| {{{other|}}} }}}
   | talk      = {{{talk| {{{other|}}} }}}
Line 34: Line 34:
   | category  = {{{category| {{{other|}}} }}}
   | category  = {{{category| {{{other|}}} }}}
   | portal    = {{{portal| {{{other|}}} }}}
   | portal    = {{{portal| {{{other|}}} }}}
   | book      = {{{book| {{{other|}}} }}}
   | draft    = {{{draft| {{{other|}}} }}}
   | other
   | other
   | #default  = {{{other|}}} <!--"demospace=other" or a new namespace-->
   | #default  = {{{other|}}} <noinclude><!--"demospace=other" or a new namespace--></noinclude>
   }}
   }}


Line 45: Line 45:
| 5 = {{{5|}}}
| 5 = {{{5|}}}
| 6 = {{{6|}}}
| 6 = {{{6|}}}
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}
| 7 = {{{7|}}}
| 8 = {{{8|}}}
| 9 = {{{9|}}}
| 10 = {{{10|}}}
| 11 = {{{11|}}}
| 12 = {{{12|}}}
| 13 = {{{13|}}}
 
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}}{{{10|}}}{{{11|}}}{{{12|}}}{{{13|}}}
}}<noinclude>
}}<noinclude>



Latest revision as of 17:46, 30 November 2023