Template:Namespace detect showall: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Davidgothberg Adding {{pp-template}}. |
meta>Davidgothberg Adding the "page" parameter, so this template can work together with {{basepage subpage}} and {{if pagename}} etc. And using more efficient main (article) space detection. |
||
| Line 5: | Line 5: | ||
{{#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}} | |||
}} | |||
}} | |||
}} | }} | ||
}} | }} | ||
| Line 17: | Line 22: | ||
<!-- Respecting empty parameters on purpose --> | <!-- Respecting empty parameters on purpose --> | ||
| showall = showall <!-- "demospace=showall" --> | | showall = showall <!-- "demospace=showall" --> | ||
| main | | main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""--> | ||
| = {{{main| {{{other|}}} }}} | |||
| talk = {{{talk| {{{other|}}} }}} | | talk = {{{talk| {{{other|}}} }}} | ||
| user = {{{user| {{{other|}}} }}} | | user = {{{user| {{{other|}}} }}} | ||
Revision as of 03:37, 13 November 2009
Lua error in Module:Documentation at line 7: Module:Documentation/config returned boolean, table expected.