CMS date filtering

Hey Webflow fam,

Hope you’re all keeping safe and healthy in these trying times. I’m trying to get to the bottom of an issue I’m having with the CMS for a client’s website. Essentially they’re putting on a festival and I’ve built a Collection to display all the up and coming bands, events, food options during the festival. When you click through on an event it takes you to the Collections page (which is my project link) and everything is displaying fine.

What my client has asked for is to display 3 images below the event details with links to other events on the same date as the item.

The trouble is there doesn’t appear to be a way to filter these items to match the date of the date of the page we are on, so say for example you go to the collections page for band A who are playing on Oct 10th. I want the three images below the info of Band A to display three other events that are also happening on that same date of Oct 10th.

I can’t find a date filtering solution that allows me to filter by the date field of the given CMS item. So that the 3 images change for each event you visit.

Am I blind or is this not possible with the limited filtering systems Webflow currently have??

Thanks so much in advance

Here is my public share link:
([how to access public share link][2])

Hi @Geeza usually these calls are done via API but you can hack it with custom code. Here is video preview that it is possible.

1 Like

@Stan You sir are a legend!

Thanks so much for showing me it’s possible mate, really appreciate you taking the time :slight_smile: Is there any chance you could share the custom code as I’m still pretty new to coding in general and have been slowly learning Javascript, CSS and HTML but wouldn’t know where to start when writing a compare function.

Much thanks :smiley:


Hi @Geeza I will be more than happy to help you with your project. You can contact me over PM to talk about details and my rates.

Hi Stan and Adam,

I am looking for the same information but the link posted here is broken. Is there anyone here willing to share the custom code / and video if possible please?

Thank you so much :slight_smile:

For dynamic filtering, you basically need to embed ALL of your possible CMS items into the page, and then use custom code to filter them appropriately.

One way to do this is to use Sygnal’s Filter, which is filters elements based on a custom code evaluation. We use it a lot for date tests like this.

Another way, if you want a user interface for the filtering, is to do this is to use Finsweet’s CMS filter and then initialize the date filter using custom code.

I don’t know what is rendered in DOM after filtering with these methods. I mean if all elements are filtered just visually or DOM contain only filtered items. As I have mentioned these request queries should be done via API.

From what I remember (original post is from 2021) I have used fragment be able to have only filtered items in DOM. Mean load all CMS let say 100 items as first stage and than let say 5 filtered items add to fragment and remove rest of items and add fragment to DOM or something like that. So DOM had only 5 CMS items.