Template:Namespace detect showall: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Headbomb
(update)
m (1 revision imported)
 
(3 intermediate revisions by 3 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}}
Line 19: Line 19:
       }}
       }}
     }}
     }}
   <!-- 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|}}} }}}
   | draft    = {{{draft| {{{other|}}} }}}
   | other
   | other
   | #default  = {{{other|}}} <!--"demospace=other" or a new namespace-->
   | #default  = {{{other|}}} <noinclude><!--"demospace=other" or a new namespace--></noinclude>
   }}
   }}



Latest revision as of 17:46, 30 November 2023