Join the Webstudio community

Updated 2 months ago

Variables, slug - Notion

At a glance

The community member is working on a multi-purpose venue website that needs to display events by year, month, and individual event pages. They are looking for guidance on how to achieve this using Notion DB. The comments suggest two options:

Option 1: Use dynamic pages with the structure website.com/events/:year/:month/:slug. This would allow filtering events by year and month, and listing all events on the /events page.

Option 2: Use query parameters with the structure website.com/events?year={}&month={}, and have a separate page for individual events at website.com/events/:slug.

The comments also mention that the Notion API has date filters, but they do not have a specific filter for just the year, as it needs to be an ISO 8601 date.

Useful resources
I'm working on a multi-purpose venue website, which will display various types of events.

I'd like to display the events for each year, month of the year & create individual page for event.

The idea is to have multiple components for my slug & combine them into dynamically generated pages - e.g.: website.com/2025/march/jazz-evening

How should I do that in Notion DB?
J
3 comments
Haven't looked at the notion api since i made the template but I recall they have a nice date filter.

Option 1, dynamic page

/events/:year/:month/:slug

While not necessary to prefix with events, I typically like doing this. You can also list all events there. Makes it easier to filter in analytics tools too.

Would need to see Notion api but maybe they have a filter you can use for year and month.

Option 2, query params

/events?year={}&month={}

Then a page for the event
/events/:slug
They dont have just year though as it needs to be an ISO 8601 date
Add a reply
Sign up and join the conversation on Discord