Template:Namespace detect showall: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Davidgothberg Making so it also understands "file" (for "image"), both as a parameter name and as a value. Since namespace "image" was renamed to "file". |
m 1 revision imported |
||
| (11 intermediate revisions by 9 users not shown) | |||
| Line 1: | Line 1: | ||
{{#switch: <!-- Use the parameter --> | {{safesubst<noinclude />:#switch: <noinclude><!-- Use the parameter --></noinclude> | ||
{{#switch: <!-- Find out which parameter to use --> | {{safesubst<noinclude />:#switch: <noinclude><!-- Find out which parameter to use --></noinclude> | ||
{{lc: <!--Lower case the result--> | {{lc: <noinclude><!--Lower case the result--></noinclude> | ||
<!--If no or empty "demospace" parameter then detect namespace--> | <noinclude><!--If no or empty "demospace" parameter then detect namespace--></noinclude> | ||
{{#if:{{{demospace|}}} | {{safesubst<noinclude />:#if:{{{demospace|}}} | ||
| {{{demospace}}} | | {{{demospace}}} | ||
| {{# | | {{safesubst<noinclude />:#if:{{{page|}}} | ||
| | | <noinclude><!--Detect the namespace in the "page" parameter--></noinclude> | ||
{{safesubst<noinclude />:#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }} | |||
| talk | | talk | ||
| {{ | | {{SUBJECTSPACE:{{{page}}} }} | ||
}} | }} | ||
}} | | <noinclude><!--No "demospace" or "page" parameters, so detect actual namespace--></noinclude> | ||
{{safesubst<noinclude />:#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | |||
| talk | |||
| {{SUBJECTSPACE}} | |||
}} | |||
}} | |||
}} | }} | ||
}} | }} | ||
<!-- Only one of the lines below will be executed --> | <noinclude><!-- Only one of the lines below will be executed --></noinclude> | ||
<!-- Respecting empty parameters on purpose --> | <noinclude><!-- Respecting empty parameters on purpose --></noinclude> | ||
| showall = showall <!-- "demospace=showall" --> | | showall = showall <noinclude><!-- "demospace=showall" --></noinclude> | ||
| main | | main <noinclude><!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""--></noinclude> | ||
| = {{{main| {{{other|}}} }}} | |||
| talk = {{{talk| {{{other|}}} }}} | | talk = {{{talk| {{{other|}}} }}} | ||
| user = {{{user| {{{other|}}} }}} | | user = {{{user| {{{other|}}} }}} | ||
| Line 28: | Line 34: | ||
| category = {{{category| {{{other|}}} }}} | | category = {{{category| {{{other|}}} }}} | ||
| portal = {{{portal| {{{other|}}} }}} | | portal = {{{portal| {{{other|}}} }}} | ||
| draft = {{{draft| {{{other|}}} }}} | |||
| other | | other | ||
| #default = {{{other|}}} <!--"demospace=other" or a new namespace--> | | #default = {{{other|}}} <noinclude><!--"demospace=other" or a new namespace--></noinclude> | ||
}} | }} | ||
| Line 38: | Line 45: | ||
| 5 = {{{5|}}} | | 5 = {{{5|}}} | ||
| 6 = {{{6|}}} | | 6 = {{{6|}}} | ||
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}} | | 7 = {{{7|}}} | ||
| 8 = {{{8|}}} | |||
| 9 = {{{9|}}} | |||
| 10 = {{{10|}}} | |||
| 11 = {{{11|}}} | |||
| 12 = {{{12|}}} | |||
| 13 = {{{13|}}} | |||
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}}{{{10|}}}{{{11|}}}{{{12|}}}{{{13|}}} | |||
}}<noinclude> | }}<noinclude> | ||
Latest revision as of 17:46, 30 November 2023
Lua error in Module:Documentation at line 7: Module:Documentation/config returned boolean, table expected.