Template:Namespace detect: Difference between revisions
m (Protected "Template:Namespace detect" ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
(New page: {{#switch: {{lc: <!--Lower case the result--> <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{{demospace}}} | ...) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
{{#if:{{{demospace|}}} | {{#if:{{{demospace|}}} | ||
| {{{demospace}}} | | {{{demospace}}} | ||
| {{# | | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | ||
| | | main | ||
| {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | |||
| talk | | talk | ||
| {{ | | {{NAMESPACE}} | ||
}} | }} | ||
}} | |||
}} | |||
}} | }} | ||
}} | }} | ||
<!-- 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 = {{{main| {{{other|}}} }}} | ||
| talk = {{{talk| {{{other|}}} }}} | | talk = {{{talk| {{{other|}}} }}} | ||
| user = {{{user| {{{other|}}} }}} | | user = {{{user| {{{other|}}} }}} | ||
| | | wikipedia = {{{wikipedia| {{{other|}}} }}} | ||
| file | | file | ||
| image = {{{file| {{{image| {{{other|}}} }}} }}} | | image = {{{file| {{{image| {{{other|}}} }}} }}} | ||
Line 32: | Line 26: | ||
| category = {{{category| {{{other|}}} }}} | | category = {{{category| {{{other|}}} }}} | ||
| portal = {{{portal| {{{other|}}} }}} | | portal = {{{portal| {{{other|}}} }}} | ||
| other | | other | ||
| #default = {{{other|}}} <!--"demospace=other" or a new namespace--> | | #default = {{{other|}}} <!--"demospace=other" or a new namespace--> | ||
Line 38: | Line 31: | ||
}}<!--End switch--><noinclude> | }}<!--End switch--><noinclude> | ||
{{pp-template|small=yes}} | |||
{{documentation}} | {{documentation}} | ||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> |
Revision as of 13:57, 9 August 2009
The above documentation is transcluded from Template:Namespace detect/doc. (editEditors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |