Template:Namespace detect showall: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
Hoof Hearted (talk | contribs) (Wikipedia > wikiindex) |
||
Line 1: | Line 1: | ||
{{#switch: | {{#switch: <!--Use the parameter--> | ||
{{#switch: | {{#switch: <!--Find out which parameter to use--> | ||
{{lc: | {{lc: <!--Lower case the result--> | ||
<!--If no or empty | <!--If no or empty 'demospace' parameter then detect namespace--> | ||
{{#if:{{{demospace|}}} | {{#if:{{{demospace|}}} | ||
| {{{demospace}}} | |{{{demospace}}} | ||
| {{#if:{{{page|}}} | |{{#if:{{{page|}}} | ||
| <!--Detect the namespace in the | |<!--Detect the namespace in the 'page' parameter--> | ||
{{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }} | {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }} | ||
| talk | |talk | ||
| {{SUBJECTSPACE:{{{page}}} }} | |{{SUBJECTSPACE:{{{page}}} }} | ||
}} | }} | ||
| <!--No | |<!--No 'demospace' or 'page' parameters, so detect actual namespace--> | ||
{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | ||
| talk | |talk | ||
| {{SUBJECTSPACE}} | |{{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--> | ||
| showall | |showall = showall <!--'demospace=showall'--> | ||
| main | |main <!--'demospace=main' or {{SUBJECTSPACE}}={{ns:0}}=""--> | ||
| | | = {{{main| {{{other|}}} }}} | ||
| talk | |talk = {{{talk| {{{other|}}} }}} | ||
| user | |user = {{{user| {{{other|}}} }}} | ||
| | |wikiindex= {{{wikiindex| {{{other|}}} }}} | ||
| file | |file | ||
| image | |image = {{{file| {{{image| {{{other|}}} }}} }}} | ||
| mediawiki = {{{mediawiki| {{{other|}}} }}} | |mediawiki= {{{mediawiki| {{{other|}}} }}} | ||
| template | |template = {{{template| {{{other|}}} }}} | ||
| help | |help = {{{help| {{{other|}}} }}} | ||
| category | |category = {{{category| {{{other|}}} }}} | ||
| portal | |portal = {{{portal| {{{other|}}} }}} | ||
| book | |book = {{{book| {{{other|}}} }}} | ||
| other | |other | ||
| #default | |#default = {{{other|}}} <!--'demospace=other' or a new namespace--> | ||
}} | }} | ||
| 1 = {{{1|}}} | |1= {{{1|}}} | ||
| 2 = {{{2|}}} | |2= {{{2|}}} | ||
| 3 = {{{3|}}} | |3= {{{3|}}} | ||
| 4 = {{{4|}}} | |4= {{{4|}}} | ||
| 5 = {{{5|}}} | |5= {{{5|}}} | ||
| 6 = {{{6|}}} | |6= {{{6|}}} | ||
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}} | |showall= {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}} | ||
}}<noinclude> | }}<noinclude> | ||
{{Documentation}} | |||
{{ | <!--Add categories to the /doc subpage, not here!--></noinclude> | ||
<!-- Add categories | |||
</noinclude> |
Revision as of 16:03, 30 June 2021
- See the user documentation for this template at Template:Namespace detect showall/doc. This WMF imported template was copied (or imported) from an existing template of the same (or similar) name as this, in accordance with the terms of their respective license(s), at either the English Wikipedia (En.Wp), Wikimedia Meta-Wiki ('Meta'), Wikimedia Commons ('Commons'), or other Wikimedia Foundation (WMF) wiki site; as found at Template:Namespace detect showall.