Hey folks! 👋 I’m working on a dynamic tabs setup using Finsweet’s Attributes Tabs. I’ve got two CMS collections:
• Event Dates: Each item is supposed to represent a unique date
• Events: Each event references an Event Date via a reference field
I’m generating both the tab links and tab panes using CMS Collection Lists pulled from the Event Dates collection.
The issue I’m running into:
In the tab links menu, I’m seeing duplicate dates showing up — I just want one tab per unique date.
Has anyone run into this before? Should I be handling the CMS differently? Or would CMS Combine be the way to go here?
Appreciate any insight! 🙏
yeah this seems like a database issue not an implementation issue. If you have many events relating to a single date, then you'd need to restructure your collections a bit to make that work. One "simple" way to do this would be to create another collection called "Event Dates" and each entry in this collection can be the date of the event, and then you'd tag/relate those events to that date. Then you have the many to single relationship mapped. If this isn't quite making sense let me know and I can try to demonstrate it a bit.
there could be "smarter" more dynamic ways of doing this if you used something like Airtable and a junction table but let me tell you from experience that it can get pretty complicated quickly doing it this way - but it would essentially be bulletproof and dynamic too, so its just about how robust you are looking to make it
if im understanding correctly Event Date will be its own Collection and in each Event Date will be Ref to the Event?
This is a personal project so my goal is to keep it simple. Ive already bit more than i can chew with this one aha