Template:Category link with count
[[:Category:{{#ifeq:{{{1}}}{{|Category:|{{safesubst:#ifexpr: 9 < 0 |{{{1}}} |{{safesubst:#ifexpr: 9+1 > 7 | | {{{1}}} }} }}|{{{1}}}}}]] (0)
{{#ifeq:category link with count |doc
|
{{#ifeq:show |show
|This is a documentation subpage for Template:Category link with count. It contains usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#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]
|
|
{{#ifeq:Category link with count|sandbox || }}
The above documentation is transcluded from Template:Clc/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |
{{#if:|
[[Category:Template documentation pages{{#translation:}}]] }}