Page 1 of 1

Count sub categories in categories image

Posted: 23 Jul 2022, 10:29
by thierrycv
Hi Christine and Jan

In categories image you count only images stored in the relevant folder and not sub categories stored inside

How is it possible to count everything ?

Exemple

Cat1 (3)
- cat1-1(2)
- cat1-1-1
- cat1-1-2
- cat1-2
- cat1-3 (2)
- cat1-3-1
- cat1-3-2

Thanks for your help

Thierry

Re: Count sub categories in categories image

Posted: 27 Jul 2022, 15:54
by Jan
Hi see similar posts in this forum. There is count only for current category. There can be two possible ways:

a) count images from current category
b) count images from currenct category and its subcategories

It was selected the a) by community (by similar logic like if someone ask you how old you are, you don't count your daughter's or son's years, only your years)

To count even images from subcateogries, for this recursive function needs to be done - first the tree of categories needs to be build and then count all images in the tree. Such function of course can slow down loading of the results as whole tree of categories needs to be checked. And because of the possible performance problems such function does not exists, so it needs to be completely customized :-(

Jan

Re: Count sub categories in categories image

Posted: 27 Jul 2022, 16:12
by thierrycv
Hi Jan
Ok then 🥲
Thanks