Difference between revisions of "Template:Category count/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zackmann08
imported>Zackmann08
 
Line 2: Line 2:
 
<!-- 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]]) -->
 
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.  
 
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
 +
{{tlc|category count|Tracking categories}} &rarr; {{category count|Tracking categories}}
 
== Usage ==
 
== Usage ==
 
The template takes up to 3 parameters:
 
The template takes up to 3 parameters:

Latest revision as of 18:35, 5 October 2018

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 (1)

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

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 (-1)
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)