Template:Category handler: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(Update calls to subtemplates /numbered and /blacklist, due to move.) |
(Using a #switch-case for the blacklist check, to make it easier to add more blacklist functions in the future.) |
||
Line 1: | Line 1: | ||
{{#ifeq: {{lc: {{{nocat|}}} }} | true |
{{#ifeq: {{lc: {{{nocat|}}} }} | true |
||
| <!--"nocat=true", don't |
| <!--"nocat=true", don't categorize--> |
||
| <!--If "data" is a number, return the corresponding |
| <!--If "data" is a number, return the corresponding |
||
numbered parameter, else return "data"--> |
numbered parameter, else return "data"--> |
||
Line 15: | Line 15: | ||
| 10 = {{{10|}}} |
| 10 = {{{10|}}} |
||
| data = |
| data = |
||
{{# |
{{#switch: |
||
{{#ifeq: {{lc: {{{nocat|}}} }} | false |
{{#ifeq: {{lc: {{{nocat|}}} }} | false |
||
| <!--"nocat=false", force |
| <!--"nocat=false", force categorize, skip blacklist check--> |
||
| {{cat handler/blacklist| page = {{{page|}}} }} <!--Check blacklist--> |
| {{cat handler/blacklist| page = {{{page|}}} }} <!--Check blacklist--> |
||
}} |
}} |
||
| <!--Blacklist returned "hide", don't |
| hide = <!--Blacklist returned "hide", don't categorize--> |
||
| #default = |
|||
<!--Check what namespace, and return the data for it--> |
|||
{{namespace detect |
{{namespace detect |
||
| main = {{{main| {{{other| 1 }}} }}} |
| main = {{{main| {{{other| 1 }}} }}} |