Difference between revisions of "Module:Category link with count/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Hyacinth
({{Internal category-link templates}})
 
blackwiki>Zyxw
(update and add examples)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
{{Larger|{{Template shortcut|CLC|clc}}}}
 +
 +
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' generates a link to a category followed by the number of pages in the category. It uses the [[mw:Help:Magic words#PAGESINCATEGORY|PAGESINCATEGORY]] [[Help:Magic words#Parser functions|parser function]].
 +
 
== Usage ==
 
== Usage ==
 +
{{tlc|{{BASEPAGENAME}}|<var>CATEGORY</var>}}
 +
 +
== Examples ==
 +
; One parameter (without "Category&#58;")
 +
: {{tlc|{{BASEPAGENAME}}|Côte-d'Or}} &rarr; {{{{BASEPAGENAME}}|Côte-d'Or}}
 +
 +
; One parameter (with "Category&#58;")
 +
: {{tlc|{{BASEPAGENAME}}|Category:Côte-d'Or}} &rarr; {{{{BASEPAGENAME}}|Category:Côte-d'Or}}
 +
 +
; Two parameters
 +
: {{tlc|{{BASEPAGENAME}}|Africa|Côte-d'Or}} &rarr; {{{{BASEPAGENAME}}|Côte-d'Or|pages}}
  
 
==See also==
 
==See also==
Line 8: Line 23:
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
+
[[Category:Internal category-link templates]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 18:37, 2 July 2017

Module: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

{{Category link with count|CATEGORY}}

Examples

One parameter (without "Category:")
{{Category link with count|Côte-d'Or}}Category:Côte-d'Or (0)
One parameter (with "Category:")
{{Category link with count|Category:Côte-d'Or}}Category:Côte-d'Or (0)
Two parameters
{{Category link with count|Africa|Côte-d'Or}}Category:Côte-d'Or (0)

See also

Template Example output
{{c}} Example
{{cl}} Category:Example
{{cls}} Cat:Example
Template Example output
{{cconly}} Template:Cconly
{{clc}} Category:Example (0)
{{lc}} Category:Example (edit | talk | history | links | watch | logs)
{{lcs}} Category:Example(edit talk links history)