Шаблон:Namespace detect — различия между версиями

Материал из Аэроскан Сервис
Перейти к: навигация, поиск
(Added "{{pp-template|small=yes}}".)
м (11 версий)
 
(не показано 7 промежуточных версии 2 участников)
Строка 4: Строка 4:
 
     {{#if:{{{demospace|}}}  
 
     {{#if:{{{demospace|}}}  
 
     | {{{demospace}}}
 
     | {{{demospace}}}
     | {{#ifeq:{{NAMESPACE}}|{{ns:0}}
+
     | {{#if:{{{page|}}}  
       | main
+
       | <!--Detect the namespace in the "page" parameter-->
      | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
+
        {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
 
         | talk
 
         | talk
         | {{NAMESPACE}}  
+
         | {{SUBJECTSPACE:{{{page}}} }}  
 
         }}
 
         }}
       }}  
+
      | <!--No "demospace" or "page" parameters, so detect actual namespace-->
 +
        {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
 +
        | talk
 +
        | {{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 -->
| main     = {{{main| {{{other|}}} }}}
+
| main       <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
 +
|          = {{{main| {{{other|}}} }}}
 
| talk      = {{{talk| {{{other|}}} }}}
 
| talk      = {{{talk| {{{other|}}} }}}
 
| user      = {{{user| {{{other|}}} }}}
 
| user      = {{{user| {{{other|}}} }}}
| wikipedia = {{{wikipedia| {{{other|}}} }}}
+
| wikibooks = {{{wikibooks| {{{other|}}} }}}
| image    = {{{image| {{{other|}}} }}}
+
| file
 +
| image    = {{{file| {{{image| {{{other|}}} }}} }}}
 
| mediawiki = {{{mediawiki| {{{other|}}} }}}
 
| mediawiki = {{{mediawiki| {{{other|}}} }}}
 
| template  = {{{template| {{{other|}}} }}}
 
| template  = {{{template| {{{other|}}} }}}
 
| help      = {{{help| {{{other|}}} }}}
 
| help      = {{{help| {{{other|}}} }}}
 +
| subject  = {{{subject| {{{other|}}} }}}
 
| category  = {{{category| {{{other|}}} }}}
 
| category  = {{{category| {{{other|}}} }}}
| portal    = {{{portal| {{{other|}}} }}}
+
| wikijunior = {{{wikijunior| {{{other|}}} }}}
 +
| cookbook  = {{{cookbook| {{{other|}}} }}}
 +
| transwiki = {{{transwiki| {{{other|}}} }}}
 
| other
 
| other
 
| #default  = {{{other|}}}  <!--"demospace=other" or a new namespace-->
 
| #default  = {{{other|}}}  <!--"demospace=other" or a new namespace-->
  
 
}}<!--End switch--><noinclude>
 
}}<!--End switch--><noinclude>
 
+
{{documentation}}
{{pp-template|small=yes}}
+
{{Documentation}}
+
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Текущая версия на 21:17, 25 мая 2015

30px Template documentation[create]