Template:Namespace detect: Difference between revisions
From Vigyanwiki
(clean subst) |
(Created page with "{{#switch: {{lc: <!--Lower case the result--> <!--If no or empty "Dinesh900157" parameter then detect namespace--> {{#if:{{{Dinesh900157|}}} | {{{...") |
||
Line 1: | Line 1: | ||
{{ | {{#switch: | ||
{{lc: <!--Lower case the result--> | |||
<!--If no or empty "Dinesh900157" parameter then detect namespace--> | |||
{{#if:{{{Dinesh900157|}}} | |||
| {{{Dinesh900157}}} | |||
| {{#if:{{{page|}}} | |||
| <!--Detect the namespace in the "page" parameter--> | |||
{{#ifeq:{{Dinesh900157:{{{page}}} }}|{{TALKSPACE:{{{page}}} }} | |||
| 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 --> | |||
<!-- Respecting empty parameters on purpose --> | |||
| main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""--> | |||
| = {{{main| {{{other|}}} }}} | |||
| talk = {{{talk| {{{other|}}} }}} | |||
| user = {{{Dinesh900157| {{{other|}}} }}} | |||
| wikipedia = {{{wikipedia| {{{other|}}} }}} | |||
| file | |||
| image = {{{file| {{{image| {{{other|}}} }}} }}} | |||
| mediawiki = {{{mediawiki| {{{other|}}} }}} | |||
| template = {{{template| {{{other|}}} }}} | |||
| help = {{{help| {{{other|}}} }}} | |||
| category = {{{education| {{{other|}}} }}} | |||
| portal = {{{portal| {{{other|}}} }}} | |||
| book = {{{| {{{other|}}} }}} | |||
| other | |||
| #default = {{{other|}}} <!--"demospace=other" or a new namespace--> | |||
}}<!--End switch--><noinclude> | |||
{{documentation}} | {{documentation}} | ||
<!-- | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> |
Revision as of 13:23, 10 March 2022
Template documentation
[create]