Template:Namespace detect: Difference between revisions
From Lockwiki
Jump to navigationJump to search
(FGxKMTZh) |
m (Reverted edits by 217.117.111.230 (Talk) to last revision by Datagram) |
||
Line 1: | Line 1: | ||
{{#switch: | |||
{{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}} | |||
}} | |||
}} | |||
}} | |||
}} | |||
<!-- Only one of the lines below will be executed --> | |||
<!-- Respecting empty parameters on purpose --> | |||
| main = {{{main| {{{other|}}} }}} | |||
| talk = {{{talk| {{{other|}}} }}} | |||
| user = {{{user| {{{other|}}} }}} | |||
| wikipedia = {{{wikipedia| {{{other|}}} }}} | |||
| file | |||
| image = {{{file| {{{image| {{{other|}}} }}} }}} | |||
| mediawiki = {{{mediawiki| {{{other|}}} }}} | |||
| template = {{{template| {{{other|}}} }}} | |||
| help = {{{help| {{{other|}}} }}} | |||
| category = {{{category| {{{other|}}} }}} | |||
| portal = {{{portal| {{{other|}}} }}} | |||
| other | |||
| #default = {{{other|}}} <!--"demospace=other" or a new namespace--> | |||
}}<!--End switch--><noinclude> | |||
{{documentation}} | |||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | |||
</noinclude> |
Revision as of 17:10, 3 August 2009
[create] Template documentation