Number of articles in subcategories shown on category page
Closed, ResolvedPublic


Author: contactbox

When one looks at a category, say "category:X" usually it lists a variety
of sub-categories, and also a variety of assorted articles which belong to
category X.

Would it be possible next to each subcategory to give a count of the
number of unique pages within that sub-category?

The idea would be, to see at a glance which sub-categories had many

I understand that there is a risk of circularity in the counting, I don't
know if that makes it technically impossible. Thoughts?

Version: unspecified
Severity: enhancement

bzimport added a project: MediaWiki-Categories.Via ConduitNov 21 2014, 8:55 PM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz3834.
bzimport created this task.Via LegacyOct 30 2005, 3:54 PM
brion added a comment.Via ConduitOct 31 2005, 12:25 AM

This would probably be unnecessarily expensive.

bzimport added a comment.Via ConduitApr 20 2006, 9:13 PM

wcpoon wrote:

What about just one level down? i.e. listing the number of immediate
sub-categories and the number of immediate pages that below to this category.
This prevents circularity, and also the running cost could be amortized as follows:

Each category keeps the two counts as part of its database entry.
When a page/category list this category as its immediate parent, the
corresponding count is incremented.
When a page/category delist this category as its immediate parent, the
corresponding count is decremented.
When this category is listed as a subcategory of its parent, the two counts are
furnished for display.

All the above operations take constant time.

bzimport added a comment.Via ConduitApr 19 2007, 10:42 PM

dbw wrote:

I would also like to express my support for such a feature. Just brackets after
the sub category name, which contains the number of objects within that
category, wich I suppose should hold both pages and further subcategories.

bzimport added a comment.Via ConduitMar 12 2008, 1:28 AM wrote:

append (X/Y)

where X = direct member articles and Y = direct member subcategories?

Prod added a comment.Via ConduitApr 8 2008, 4:11 PM

This bug seems to be much easier now that bug 6943 has been fixed.

Tbleher added a comment.Via ConduitOct 22 2009, 6:29 AM

If I understand this bug report correctly, this already works on Wikipedia (probably through the CategoryTree extension). If not, please reopen the bug with a description what is still missing.

Add Comment