మూస:Category count
Appearance
[[:Category:{{{1}}}|{{{1}}}]] (0)
This template is used to display the number of pages in a category. While it can be used for ANY category, it is intended to be used for tracking categories that should be empty. If the category is not empty, it will turn red.
- Example
{{category count|Tracking categories}}
→ Tracking categories (126)
Usage
[మార్చు]The template takes up to 3 parameters:
{{Category count|category_name}}
{{Category count|category_name|link_text}}
{{Category count|category_name|link_text|base_count}}
Examples
[మార్చు]- Non-empty category
{{category count|Unknown parameters}}
→ Unknown parameters (3){{category count|Unknown parameters|Pages with unknown params}}
→ Pages with unknown params (3)
- Empty category
- Note this category is obviously NOT empty, so this is a hard coded example to demonstrate what it would look like IF it was empty
{{category count|Unknown parameters}}
→ Unknown parameters (0){{category count|Unknown parameters|Pages with unknown params}}
→ Pages with unknown params (0)
In some cases the category will never be empty. For example Category:Convert errors has a subcategory that is always present. In this case a third param can be added that is basically saying "only turn red if the count is larger than {{{3}}}
- So assume that the category has 10 pages in it plus the 1 sub category. Technically there are 11 results, but you only care about the 10 pages. So
{{Category count|Convert errors|Convert|1}}
→ Convert (13)
- So if the category has no pages in it, but still does have that 1 subcategory, then you could do
{{Category count|Convert errors|Convert|1}}
→ Convert (0)