Template:Category other: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>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 (12 revisions imported)
 
(11 intermediate revisions by 5 users not shown)
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
     }}  
     }}
   }}
   }}
<!--If any parameter, then don't return the "category/other" strings-->
| category = {{{1|}}}
| category   = {{#if:{{{1|}}}{{{2|}}} | {{{1|}}} | category }}
| other
| other
| #default = {{#if:{{{1|}}}{{{2|}}} | {{{2|}}} | other }}
| #default = {{{2|}}}
 
}}<!--End switch--><noinclude>
}}<!--End switch--><noinclude>


{{pp-template|small=yes}}
{{documentation}}
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Latest revision as of 12:57, 3 September 2020