Template:Namespace detect showall: Difference between revisions

Wikipedia > wikiindex
m (1 revision)
 
(Wikipedia > wikiindex)
Line 1: Line 1:
{{#switch:   <!-- Use the parameter -->
{{#switch: <!--Use the parameter-->
   {{#switch:   <!-- Find out which parameter to use -->
   {{#switch: <!--Find out which parameter to use-->
     {{lc:   <!--Lower case the result-->
     {{lc:     <!--Lower case the result-->
       <!--If no or empty "demospace" parameter then detect namespace-->
       <!--If no or empty 'demospace' parameter then detect namespace-->
       {{#if:{{{demospace|}}}  
       {{#if:{{{demospace|}}}
       | {{{demospace}}}
       |{{{demospace}}}
       | {{#if:{{{page|}}}  
       |{{#if:{{{page|}}}
         | <!--Detect the namespace in the "page" parameter-->
         |<!--Detect the namespace in the 'page' parameter-->
           {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
           {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
           | talk
           |talk
           | {{SUBJECTSPACE:{{{page}}} }}  
           |{{SUBJECTSPACE:{{{page}}} }}
           }}
           }}
         | <!--No "demospace" or "page" parameters, so detect actual namespace-->
         |<!--No 'demospace' or 'page' parameters, so detect actual namespace-->
           {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
           {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
           | talk
           |talk
           | {{SUBJECTSPACE}}  
           |{{SUBJECTSPACE}}
           }}
           }}
         }}
         }}
       }}
       }}
     }}
     }}
   <!-- Only one of the lines below will be executed -->
   <!--Only one of the lines below will be executed-->
   <!-- Respecting empty parameters on purpose -->
   <!--Respecting empty parameters on purpose-->
   | showall   = showall   <!-- "demospace=showall" -->
   |showall = showall <!--'demospace=showall'-->
   | main         <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
   |main       <!--'demospace=main' or {{SUBJECTSPACE}}={{ns:0}}=""-->
   |           = {{{main| {{{other|}}} }}}
   |         = {{{main| {{{other|}}} }}}
   | talk     = {{{talk| {{{other|}}} }}}
   |talk     = {{{talk| {{{other|}}} }}}
   | user     = {{{user| {{{other|}}} }}}
   |user     = {{{user| {{{other|}}} }}}
   | wikipedia = {{{wikipedia| {{{other|}}} }}}
   |wikiindex= {{{wikiindex| {{{other|}}} }}}
   | file
   |file
   | image     = {{{file| {{{image| {{{other|}}} }}} }}}
   |image   = {{{file| {{{image| {{{other|}}} }}} }}}
   | mediawiki = {{{mediawiki| {{{other|}}} }}}
   |mediawiki= {{{mediawiki| {{{other|}}} }}}
   | template = {{{template| {{{other|}}} }}}
   |template = {{{template| {{{other|}}} }}}
   | help     = {{{help| {{{other|}}} }}}
   |help     = {{{help| {{{other|}}} }}}
   | category = {{{category| {{{other|}}} }}}
   |category = {{{category| {{{other|}}} }}}
   | portal   = {{{portal| {{{other|}}} }}}
   |portal   = {{{portal| {{{other|}}} }}}
   | book     = {{{book| {{{other|}}} }}}
   |book     = {{{book| {{{other|}}} }}}
   | other
   |other
   | #default = {{{other|}}} <!--"demospace=other" or a new namespace-->
   |#default = {{{other|}}} <!--'demospace=other' or a new namespace-->
   }}
   }}


| 1 = {{{1|}}}
|1= {{{1|}}}
| 2 = {{{2|}}}
|2= {{{2|}}}
| 3 = {{{3|}}}
|3= {{{3|}}}
| 4 = {{{4|}}}
|4= {{{4|}}}
| 5 = {{{5|}}}
|5= {{{5|}}}
| 6 = {{{6|}}}
|6= {{{6|}}}
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}
|showall= {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}
}}<noinclude>
}}<noinclude>
 
{{Documentation}}
{{documentation}}
<!--Add categories to the /doc subpage, not here!--></noinclude>
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>