Filters with counts and CMS Library

Hey !

I’m trying to achieve something thanks to CMS Library (Finsweet) but i’m not finding any solution on web.

Here is the screen of what I want to reproduce

So thoses are filters with the number of items right of them,
so I have two questions:

  • Is it possible to access to the CMS from custom code ? I’d like to have this kind of result:
    [{ item1 }, {item2}]

  • How to link the good category to the good number ? I added some classes to each button with the category name thanks from custom code

Thank you for your help !
Simon

Good question… have you found an answer yet? This is also exactly what I need for a new project.

The short answer is no.

Technically it’s possible with script, but your website would be too slow and useless because literally the script would have to walk through hundreds of pages to do the categorical counting.

Even the API doesn’t offer item filter-queries or an item count function- even if it could be accessed by client side script ( it cannot ).

Your best option is probably to pay for a service that syncs your CMS to an external data store like AirTable, and then build a view there that you can query.