Difference between revisions of "Template:Namespace detect"
From Self-sufficiency
(Remarking away "{{pp-template|small=yes}}" for now.) |
m (1 revision) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
{{#if:{{{demospace|}}} | {{#if:{{{demospace|}}} | ||
| {{{demospace}}} | | {{{demospace}}} | ||
− | | {{# | + | | {{#if:{{{page|}}} |
− | | | + | | <!--Detect the namespace in the "page" parameter--> |
− | + | {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }} | |
| talk | | 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 --> | <!-- Only one of the lines below will be executed --> | ||
<!-- Respecting empty parameters on purpose --> | <!-- Respecting empty parameters on purpose --> | ||
− | | main | + | | main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""--> |
+ | | = {{{main| {{{other|}}} }}} | ||
| talk = {{{talk| {{{other|}}} }}} | | talk = {{{talk| {{{other|}}} }}} | ||
| user = {{{user| {{{other|}}} }}} | | user = {{{user| {{{other|}}} }}} | ||
| wikipedia = {{{wikipedia| {{{other|}}} }}} | | wikipedia = {{{wikipedia| {{{other|}}} }}} | ||
− | | image = {{{image| {{{other|}}} }}} | + | | file |
+ | | image = {{{file| {{{image| {{{other|}}} }}} }}} | ||
| mediawiki = {{{mediawiki| {{{other|}}} }}} | | mediawiki = {{{mediawiki| {{{other|}}} }}} | ||
| template = {{{template| {{{other|}}} }}} | | template = {{{template| {{{other|}}} }}} | ||
Line 25: | Line 32: | ||
| category = {{{category| {{{other|}}} }}} | | category = {{{category| {{{other|}}} }}} | ||
| portal = {{{portal| {{{other|}}} }}} | | portal = {{{portal| {{{other|}}} }}} | ||
+ | | book = {{{book| {{{other|}}} }}} | ||
| other | | other | ||
| #default = {{{other|}}} <!--"demospace=other" or a new namespace--> | | #default = {{{other|}}} <!--"demospace=other" or a new namespace--> | ||
Line 30: | Line 38: | ||
}}<!--End switch--><noinclude> | }}<!--End switch--><noinclude> | ||
− | + | {{documentation}} | |
− | + | ||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> |
Latest revision as of 18:39, 13 October 2010
[edit]
Documentation