Template:Namespace detect: Difference between revisions
Jump to navigation
Jump to search
clean subst |
m 1 revision imported from wikipedia:Template:Namespace_detect |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{#switch: | ||
{{ | {{lc: <!--Lower case the result--> | ||
<!-- | <!--If no or empty "demospace" parameter then detect namespace--> | ||
</noinclude> | {{#if:{{{demospace|}}} | ||
| {{{demospace}}} | |||
| {{#if:{{{page|}}} | |||
| <!--Detect the namespace in the "page" parameter--> | |||
{{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }} | |||
| talk | |||
| {{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 --> | |||
<!-- Respecting empty parameters on purpose --> | |||
| main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""--> | |||
| = {{{main| {{{other|}}} }}} | |||
| talk = {{{talk| {{{other|}}} }}} | |||
| user = {{{user| {{{other|}}} }}} | |||
| wickedgov = {{{wickedgov| {{{other|}}} }}} | |||
| file | |||
| image = {{{file| {{{image| {{{other|}}} }}} }}} | |||
| mediawiki = {{{mediawiki| {{{other|}}} }}} | |||
| template = {{{template| {{{other|}}} }}} | |||
| help = {{{help| {{{other|}}} }}} | |||
| category = {{{category| {{{other|}}} }}} | |||
| other | |||
| #default = {{{other|}}} <!--"demospace=other" or a new namespace--> | |||
}}<!--End switch--><noinclude>''This template was copied from [[wikipedia:Special:Permalink/388733912|English Wikipedia]]. It is licensed under CC BY-SA 4.0, and has been adapted for use on WickedGov. The contributors to the page are available in the page history.'' | |||
This template is a metatemplate. This means that it may not be useful for direct transclusion, but it should not be deleted because it is used in other templates.</noinclude> |
Latest revision as of 11:40, 9 January 2025
This template was copied from English Wikipedia. It is licensed under CC BY-SA 4.0, and has been adapted for use on WickedGov. The contributors to the page are available in the page history.
This template is a metatemplate. This means that it may not be useful for direct transclusion, but it should not be deleted because it is used in other templates.