Hello, I’m facing a challenge with displaying Collection Items conditionally in Webflow. I have a list of hotels that need to be shown or hidden based on contract dates. Each hotel is categorized into one of three groups, and the visibility depends on two date fields: ‘Contract Start Date’ and ‘Contract End Date’. Not all hotels have these dates as some are ongoing partnerships without specified end dates.
Here’s the issue: When I set the filters to match ‘all’ conditions, nothing displays because some hotels don’t have dates assigned. If I switch to ‘any’ conditions, the results ignore the categories due to the date fields. I need a way to display hotels that either match the current date criteria or have no dates defined, all while respecting their categorization.
I’ve tried adjusting the filters, but I can’t seem to include items with empty date fields when using ‘all’ conditions. Is there a way to set up the filters or should I resort to custom code to achieve the desired functionality? If custom code is the solution, could anyone guide me on how to implement it, taking into account the different categories and the presence (or absence) of date fields?
I appreciate any help or suggestions from the community. Please let me know if you need more details or a read-only link to my project.