CMS Filter on Nested Collection List

We are currently using CMS Load, CMS Nest, CMS Filter. We hope to be able to filter items within a nested collection list utilizing tags (filtering), however when we filter by a specific tag, all the nested items within the parent collection are still visible. We would like only the items which have been filtered by the tag to show. Can this be done?

Note that this page is WIP but you will see under the images when you sort by tag, that even artist sections in the page with only one tag - show all the items within the nested collection.

Desired effect: When the user clicks the “Software” tag and filters the page, only items under each artist with a “Software” tag are shown. If another tag is added to the filtering, only “Software” plus that other tag are shown.

Another smaller ask is that the total number of items shown in the filters is correct ~950 artworks, however we would like the filtered amount to reflect this same desired effect. Right now the ‘results-count’ reflects the number filtered from the parent collection and not the nested collection.

Please let me know if you have any clarifying questions.

Thanks so much in advance!
Dan

Link

gm finsweet magicians / technicians.

i’ve also realized that similarly, the search only effects the parent colection (in this case “artists”) but not the works in the nested collection within them. perhaps there is a way to properly point it to address the nested collection with attributes or some additional code?

thanks again!
dan

@Support-Luis wondering if you’ve got any ideas here. thanks man!

Hey @dan4!

I have just tested the live site and seems the issues have been resolved as I am filtering for “Software” and the items are appearing as they should and the results count displays “90 of 967” as expected.

Could you share what the issue was? Or if this is not the desired behavior can you please share a quick loom on the desired outcome?

Thanks!

fantastic to hear from you! let me record a loom in the morning to give some more detail.

@Support-Luis Good Morning!

here is the Loom

Some bulletpoints for you to refer back to:

  • Collection Page is Grouped By Artists
  • There are >100 Artists so we need to use CMS Load to grab everything.
  • Artists sometimes have >5 referenced Artworks in their collection, so we need to use CMS Nest
  • Collection page needs to be able to filter Artworks.
  • On first load, it’s laggy, shows the tags.
  • We only want to grab Image, but we’re getting software.
  • Additionally, the result count + item count differ.
  • Search has a similar issue to the filters, when i search “Genomes” I get artworks labled, Genomes, but I also get everything else in that artists collection.

Please let us know your thoughts! Thanks immeasurably.

Hey @dan4! Thank you for the Loom!

I am afraid the current setup is not going to work the way you want it to.

The reason for this behavior is that you’re essentially filtering the Artist collection while using fields from the Artwork collection as the filter criteria. This is why you’re seeing the “Software” result when filtering for the “AI” category. Since the Ana Maria Caballero item contains both categories, these are treated as tags for her item, and the filter returns a positive result.

In summary, the nested collection itself isn’t filterable, but it serves as a basis for filtering the parent collection.

I can try to integrate some code to hide the children element of an item that does not meet the filter’s exact criteria.

Let me know if this is something you want to try :muscle:

hey @Support-Luis that sounds great as a start! would be super helpful to us. this is a wonderful way to get things moving in the right direction

or perhaps there’s a solution here you can see, which we havent thought of. re: “current setup is not going to work the way you want it to” let us know!

@Support-Luis let me know if you have time to help us with a solve today - hoping to have this feature live tomorrow if possible! thanks

Hey @dan4! I’m sorry for the radio silence. I have been testing some ideas and have not found a viable solution.

I suggest waiting for Attributes V2 where I’m pretty sure we could achieve this almost natively.

no worries @Support-Luis appreciate the answer! any idea when that is slated for?

We are very close to launch! Keep an eye out on our socials to know more!

:eyes: