Guest
29 Oct 2013 10:28

In the Cobalt 7 category template there are options to display a count to categories and subcategories that shows the number of records in that category. Does anyone know of a way I can get a count of records in a category and all of it's subcategories?

When I have users navigate down through the categories and subcategories, it would be nice for them to know if there is lots of information somewhere in a category or it's subcategories. If I just display the count of records in a category and not the subcategories, a user may think there is nothing under that category but in fact there is, just in subcategories of that category.

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
30 Oct 2013 00:16

Unfortunately this feature was dropped as it was one of the main reason of slowness.

The query which calculate may severely slow down Cobalt performance. And since we did not find a good way to implement it we rather keep Cobalt without this feature than affect its performance.


Guest
30 Oct 2013 06:58

Understandable. That could be quite a slow query. On my site I have over 100 categories and that number will grow a lot.

The only way to do it would be to keep the counts in a table for quick lookup along with a tool for rebuilding the counts when errors inevitably creep in.


Sergey
Total posts: 13,748
31 Oct 2013 00:44

The only way to do it would be to keep the counts in a table for quick lookup along with a tool for rebuilding the counts when errors inevitably creep in.

Yes this is what first come to mind. But count seriously depends on User. For example for public it is 0. For special it is 10 because he may see unpublished records and for registered it is 5. There is no way to pre-save count number. It should query every time we list categories.


Sergey
Total posts: 13,748
13 Nov 2013 00:31

I mean, a guest visiter might see the real count as a "teaser"

Maik, you will be first who will write that number does not mutch real number of articles. And If i start explain that this is a teaser your next comment will be :0. And you will tell that number should match exactly what is in category otherwise it will create confusion.


Sergey
Total posts: 13,748
13 Nov 2013 22:57

I will not comment all your suggestions but all those will not work well. All of them has disadvantages.

Powered by Cobalt