Get total count of items in a parent collection and its nested collections
  • The following code works for retrieving the count of items with a particular category association. But we're using a nested structure, and I need to retrieve the count of the parent collection as well as the children. Is there a quick solution for this besides iterating through all child collections and counting them?

    <v?=ceil(vae("store[category/name='<v=name>']")->totalMatches()) ?>

  • 1 Answer sorted by
  • You'd need to iterate through these, unfortunately. The good news is I don't think it'd be that hard to do.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion