Template:Category other: Difference between revisions
Jump to navigation
Jump to search
Sources>Davidgothberg Created this category/other namespace detecting template. Copied and modified the code from {{image other}}. Guess it is overengineered but it makes it fully compatible with the others. |
m 13 revisions imported |
||
(12 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{#switch: | {{safesubst:<noinclude/>#switch: | ||
<!--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|}}} | ||
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | | {{safesubst:<noinclude/>lc: {{{demospace}}} }} <noinclude><!-- Use lower case "demospace" --></noinclude> | ||
| {{#ifeq:{{NAMESPACE}}|Category | | {{safesubst:<noinclude/>#ifeq:{{safesubst:<noinclude/>NAMESPACE}}|{{safesubst:<noinclude/>ns:Category}} | ||
| category | | category | ||
| other | | other | ||
}} | }} | ||
}} | }} | ||
| category = {{{1|}}} | |||
| category | |||
| other | | other | ||
| #default = | | #default = {{{2|}}} | ||
}}<noinclude><!-- End switch --> | |||
{{documentation}} | |||
{{ | |||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> |