Template:Category other: Difference between revisions
Jump to navigation
Jump to search
Sources>Davidgothberg Removing the "return 'category'/'other' when no parameter" function, since not used, not needed and causes problems in some situations. |
Sources>Davidgothberg Changing "Category" to "{{ns:Category}}". Thus slightly easier to port to other projects. |
||
Line 1: | Line 1: | ||
{{#switch: | {{#switch: | ||
<!--If no or empty "demospace" parameter then detect namespace--> | <!--If no or empty "demospace" parameter then detect namespace--> | ||
{{#if:{{{demospace|}}} | {{#if:{{{demospace|}}} | ||
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | ||
| {{#ifeq:{{NAMESPACE}}|Category | | {{#ifeq:{{NAMESPACE}}|{{ns:Category}} | ||
| category | | category | ||
| other | | other | ||
}} | }} | ||
}} | }} | ||
| category = {{{1|}}} | | category = {{{1|}}} | ||
Line 13: | Line 13: | ||
}}<!--End switch--><noinclude> | }}<!--End switch--><noinclude> | ||
{{pp-template | {{pp-template}} | ||
{{ | {{documentation}} | ||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> |