Difference between revisions of "Template:Namespace detect"
From Self-sufficiency
m (1 revision) |
(Creating this very flexible namespace detecting template.) |
||
(6 intermediate revisions by one other user 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|}}} }}} | | wikipedia = {{{wikipedia| {{{other|}}} }}} | ||
− | + | | image = {{{image| {{{other|}}} }}} | |
− | | image = | + | |
| mediawiki = {{{mediawiki| {{{other|}}} }}} | | mediawiki = {{{mediawiki| {{{other|}}} }}} | ||
| template = {{{template| {{{other|}}} }}} | | template = {{{template| {{{other|}}} }}} | ||
Line 32: | Line 25: | ||
| 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 30: | ||
}}<!--End switch--><noinclude> | }}<!--End switch--><noinclude> | ||
− | {{pp-template}} | + | {{pp-template|small=yes}} |
− | {{ | + | {{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 03:24, 15 May 2008
[edit]
Documentation