Template:Category handler: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
More efficient code for the "category" parameter. No change in functionality.
(Adding support for "category=empty/no/not defined/¬/yes" for backwards compatibility, to ease deployment. Unfortunately bloating the code.)
(More efficient code for the "category" parameter. No change in functionality.)
Line 4:
}}{{#ifeq: {{lc: {{{categories|}}} }} | no
| dontcat <!--"categories=no", don't categorize-->
}}{{#ifeqswitch: {{lc: {{{category|¬}}} | ¬}}
| no <!--"category = ¬no" or "category" not defined-->
| {{#if: {{{ = dontcat <!--"category|}}} =", defined but empty-->
|}} <!--Else "category = yes¬" or hasnot defined or "yes" or other data-->
| {{#ifeq: {{lc: {{{category|}}} }} | no
 
| dontcat
| <!--"category = yes" or has other data-->
}}
| dontcat <!--"category" is defined but empty-->
}}
}}
| <!--Don't categorise (result was "dontcat" or "dontcatdontcat" and so on)-->
| <!--If "data" is a number, return the corresponding
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu