Template:Category link with count

From Anarchy Online Wiki [AOWiki]
(Redirected from Template:Clc)

[[:Category:{{#ifeq:{{{1}}}{{|Category:|{{safesubst:#ifexpr: 9 < 0 |{{{1}}} |{{safesubst:#ifexpr: 9+1 > 7 | | {{{1}}} }} }}|{{{1}}}}}]] (0)

Template documentation[view] [edit] [history] [purge]

{{#ifeq:category link with count |doc

    | 

{{#ifeq:show |show

|
        }}{{#if: |
         |   {{#ifexist:Template:Category link with count
                  | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}

Template:Category link with count generates a link to a category followed by the number of pages in the category. It uses the PAGESINCATEGORY parser function.

Usage[edit]

One parameter
{{{{#if:Category link with count|Category link with count| tlc|...}}{{#ifeq:CATEGORY|CATEGORY| |CATEGORY | }}{{#ifeq:x|| |{{{3}}} | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}
{{{{#if:clc|clc| tlc|...}}{{#ifeq:CATEGORY|CATEGORY| |CATEGORY | }}{{#ifeq:x|| |{{{3}}} | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}
{{{{#if:CLC|CLC| tlc|...}}{{#ifeq:CATEGORY|CATEGORY| |CATEGORY | }}{{#ifeq:x|| |{{{3}}} | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}
Two parameters
{{{{#if:Category link with count|Category link with count| tlc|...}}{{#ifeq:CATEGORY|CATEGORY| |CATEGORY | }}{{#ifeq:TYPE|TYPE| |TYPE | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}
{{{{#if:clc|clc| tlc|...}}{{#ifeq:CATEGORY|CATEGORY| |CATEGORY | }}{{#ifeq:TYPE|TYPE| |TYPE | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}
{{{{#if:CLC|CLC| tlc|...}}{{#ifeq:CATEGORY|CATEGORY| |CATEGORY | }}{{#ifeq:TYPE|TYPE| |TYPE | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}

Examples[edit]

Using the template shortcut {{{{#if: |subst:}}clc{{#if: ||{{{2}}}}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}}:

One parameter[edit]

without "Category:"
{{{{#if:clc|clc| tlc|...}}{{#ifeq:C�te-d'Or|C�te-d'Or| |C�te-d'Or | }}{{#ifeq:x|| |{{{3}}} | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}} → [[:Category:{{#ifeq:C�te-d'OrC�te-d|Category:|{{safesubst:#ifexpr: 9 < 0

|C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|C�te-d'Or}}]] ({{PAGESINCATEGORY:{{#ifeq:C�te-d'OrC�te-d|Category:|{{safesubst:#ifexpr: 9 < 0 |C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|C�te-d'Or}}|all}})

with "Category:"
{{{{#if:clc|clc| tlc|...}}{{#ifeq:Category:C�te-d'Or|Category:C�te-d'Or| |Category:C�te-d'Or | }}{{#ifeq:x|| |{{{3}}} | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}} → [[:Category:{{#ifeq:Category:|Category:|{{safesubst:#ifexpr: 9 < 0

|Category:C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|Category:C�te-d'Or}}]] ({{PAGESINCATEGORY:{{#ifeq:Category:|Category:|{{safesubst:#ifexpr: 9 < 0 |Category:C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|Category:C�te-d'Or}}|all}})

Two parameters[edit]

without "Category:"
{{{{#if:clc|clc| tlc|...}}{{#ifeq:C�te-d'Or|C�te-d'Or| |C�te-d'Or | }}{{#ifeq:pages|pages| |pages | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}} → [[:Category:{{#ifeq:C�te-d'OrC�te-d|Category:|{{safesubst:#ifexpr: 9 < 0

|C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|C�te-d'Or}}]] ({{PAGESINCATEGORY:{{#ifeq:C�te-d'OrC�te-d|Category:|{{safesubst:#ifexpr: 9 < 0 |C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|C�te-d'Or}}|pages}})

{{{{#if:clc|clc| tlc|...}}{{#ifeq:C�te-d'Or|C�te-d'Or| |C�te-d'Or | }}{{#ifeq:subcats|subcats| |subcats | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}} → [[:Category:{{#ifeq:C�te-d'OrC�te-d|Category:|{{safesubst:#ifexpr: 9 < 0

|C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|C�te-d'Or}}]] ({{PAGESINCATEGORY:{{#ifeq:C�te-d'OrC�te-d|Category:|{{safesubst:#ifexpr: 9 < 0 |C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|C�te-d'Or}}|subcats}})

{{{{#if:clc|clc| tlc|...}}{{#ifeq:C�te-d'Or|C�te-d'Or| |C�te-d'Or | }}{{#ifeq:files|files| |files | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}} → [[:Category:{{#ifeq:C�te-d'OrC�te-d|Category:|{{safesubst:#ifexpr: 9 < 0

|C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|C�te-d'Or}}]] ({{PAGESINCATEGORY:{{#ifeq:C�te-d'OrC�te-d|Category:|{{safesubst:#ifexpr: 9 < 0 |C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|C�te-d'Or}}|files}})

with "Category:"
{{{{#if:clc|clc| tlc|...}}{{#ifeq:Category:C�te-d'Or|Category:C�te-d'Or| |Category:C�te-d'Or | }}{{#ifeq:pages|pages| |pages | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}} → [[:Category:{{#ifeq:Category:|Category:|{{safesubst:#ifexpr: 9 < 0

|Category:C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|Category:C�te-d'Or}}]] ({{PAGESINCATEGORY:{{#ifeq:Category:|Category:|{{safesubst:#ifexpr: 9 < 0 |Category:C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|Category:C�te-d'Or}}|pages}})

{{{{#if:clc|clc| tlc|...}}{{#ifeq:Category:C�te-d'Or|Category:C�te-d'Or| |Category:C�te-d'Or | }}{{#ifeq:subcats|subcats| |subcats | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}} → [[:Category:{{#ifeq:Category:|Category:|{{safesubst:#ifexpr: 9 < 0

|Category:C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|Category:C�te-d'Or}}]] ({{PAGESINCATEGORY:{{#ifeq:Category:|Category:|{{safesubst:#ifexpr: 9 < 0 |Category:C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|Category:C�te-d'Or}}|subcats}})

{{{{#if:clc|clc| tlc|...}}{{#ifeq:Category:C�te-d'Or|Category:C�te-d'Or| |Category:C�te-d'Or | }}{{#ifeq:files|files| |files | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}} → [[:Category:{{#ifeq:Category:|Category:|{{safesubst:#ifexpr: 9 < 0

|Category:C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|Category:C�te-d'Or}}]] ({{PAGESINCATEGORY:{{#ifeq:Category:|Category:|{{safesubst:#ifexpr: 9 < 0 |Category:C�te-d'Or |{{safesubst:#ifexpr: 9+1 > | | Lua error in Module:String at line 85: attempt to perform arithmetic on local 'len' (a nil value). }} }}|Category:C�te-d'Or}}|files}})

See also[edit]

Template Example output
{{c}} Example
{{cl}} {{#ifeq:{{#titleparts:Category link with count|1}}|Stub types for deletion |Cat:Example | Category:Example{{#ifeq:{{safesubst:#switch: no no n false 0 = = � = yes y true 1 = yes #default = yes

}}|yes| {{#ifexpr:0>={{#expr:0+1}}|}}( 0 ){{#ifexpr:0>={{#expr:0+1}}|}}}}}}

{{cls}} Cat:Example
Template Example output
{{clc}} [[:Category:{{#ifeq:ExampleEx|Category:|{{safesubst:#ifexpr: 9 < 0 Example |

Example }} }}|Example}}]] (0)

{{lc}} {{#if: Category:Example }}({{#if: edit |}} {{#if: talk |}} {{#if: history |}} {{#if: links |}} {{#if: watch |}} {{#if: logs}})
{{lcs}} Category:Example(edit talk links history)

{{#ifeq:Category link with count|sandbox || }}

{{#if:|

[[Category:Template documentation pages{{#translation:}}]] }}