模板:Namespace detect:修订间差异

来自悠日計画 維基百科 ~ Yuuni Wiki
回退到由Hamish討論)做出的修訂版本65887169:Per ep
导入1个版本
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
{{#switch:
{{SAFESUBST:<noinclude />#invoke:Namespace detect|main}}<noinclude>
  {{lc:               <!--Lower case the result-->
    <!--If no or empty "demospace" parameter then detect namespace-->
    {{#if:{{{demospace|}}}
    | {{{demospace}}}
    | {{#ifeq:{{NAMESPACE}}|{{ns:0}}
      | main
      | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
        | talk
        | {{NAMESPACE}}
        }}
      }}
    }}
  }}
| main      = {{#switch:{{str mid|{{FULLPAGENAME}}||{{#expr:abs({{str find|{{FULLPAGENAME}}|:}})-1}}}}<!--
---->| MOS = {{{pseudo| {{{mos| {{{other|}}} }}} }}}<!--
---->| LTA = {{{pseudo| {{{lta| {{{other|}}} }}} }}}<!--
---->| NT = {{{pseudo| {{{nt| {{{other|}}} }}} }}}<!--
---->| NC = {{{pseudo| {{{nc| {{{other|}}} }}} }}}<!--
---->| #default = {{{main| {{{other|}}} }}}<!--
---->}}
| talk      = {{{talk| {{{other|}}} }}}
| user      = {{{user| {{{other|}}} }}}
| wikipedia = {{{wikipedia| {{{other|}}} }}}
| image    = {{{image| {{{other|}}} }}}
| mediawiki = {{{mediawiki| {{{other|}}} }}}
| template  = {{{template| {{{other|}}} }}}
| help      = {{{help| {{{other|}}} }}}
| category  = {{{category| {{{other|}}} }}}
| portal    = {{{portal| {{{other|}}} }}}
| wikiproject = {{{wikiproject| {{{other|}}} }}}
| other
| #default  = {{{other|}}}
}}<!--End switch--><noinclude>
{{documentation}}
{{documentation}}
<!-- Add categories to the /doc subpage, and interwikis to Wikidata. -->
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
</noinclude>

2022年12月1日 (四) 05:42的最新版本

<templatestyles src="Module:Documentation/styles.css"></templatestyles>