Events
Concerts, workshops, market days, opening hours over the holidays: many websites live from their dates. The events module turns one list in your content repo into a calendar that sorts itself, with a page for every event and a button that puts it into the visitor's own calendar.
Goal
By the end of this chapter you can:
- list events with pictures, places and descriptions,
- never move an old event by hand again,
- give every event its own page and calendar file,
- use one link that always points to the next event.
Switching it on
Please add an events module at /events and show the upcoming events
on the home page too.
In app.sml:
Events { path: "/events" }
A page for /events with Events { } on it, and the file events.sml in your content repo.

An event
All events live in events.sml, one block each:
Event {
id: "2026-11-14-bread-workshop"
title: "Bread workshop: your first sourdough"
start: "2026-11-14 10:00"
end: "2026-11-14 14:00"
place: "Our Bakery, Market Street 3, Wittenberg"
image: "events/workshop.jpg"
teaser: "Four hours, six people, one oven. You take your own loaf home."
text: "events/2026-11-14-bread-workshop.md"
link: "/contact"
}
| Line | Meaning |
|---|---|
id |
address of the event page: lower case, digits, -. Starting with the date keeps the file tidy. |
title |
the name |
start |
"2026-11-14 10:00", or only "2026-11-14" for an all-day event |
end |
optional; may be on another day |
place |
optional |
image |
flyer or photo below static/ (optional) |
teaser |
short text in the list (optional) |
text |
Markdown file with the long description (optional) |
link |
tickets or more information: https://… or a page of your site (optional) |
To add an event: upload the flyer to static/events/, copy an Event block, change it, commit.
It sorts itself
Upcoming events come first, the soonest at the top. Past events move down into "Past events" by themselves, the most recent first, and after a few (five by default) a link shows the rest. An event stays "upcoming" the whole day it happens.
So you never delete or move old events. They stay as an archive, and the list is always right.
The event page
Every event has a page, here /events/2026-11-14-bread-workshop: the full flyer, the description, the link button, and "Add to calendar". That is a calendar file that phones and calendar programs understand: one tap, and the workshop is in the visitor's calendar with time and place.
After the event, the page stays and says that it has taken place.
One link for the next event
/events/next always leads to the page of the next upcoming event. Put it on a flyer, in a QR code, on an Instagram profile, in the newsletter. You never have to change it.
Your words, your language
Every visible text of the module — the headings, the buttons, even the date format — comes from a Labels { } block at the top of events.sml. A band says "Gigs", a yoga studio "Classes":
Labels {
upcoming: "Coming up" upcoming_de: "Demnächst"
past: "Past events" past_de: "Vergangene Termine"
details: "Details"
}
Without labels, ForgeCMS uses built-in German and English texts. Every line of an event can be translated with _de, _fr and so on.
The date format follows the labels too, so a German site shows "Samstag, 14. November 2026, 10:00–14:00 Uhr", an English one "Saturday, November 14, 2026, 10:00 AM–2:00 PM".
Pitfalls
- An event is missing: a duplicate
id, a date the module cannot read (it must beYYYY-MM-DDand optionallyHH:MM), or a typo inevents.sml. The log names it. - An event is in "past" too early: without
end, it stays upcoming until midnight; with a wrongendit may end early. - The link button does not appear:
linkmust start withhttps://,http://or/. - Times are off by an hour: the times are local to the site's time zone, Berlin by default. Another country? Ask the AI to set
timezone.
What you learned
Events { path }switches the module on; all events are blocks inevents.sml.- The list sorts itself into upcoming and past. Old events are never moved.
- Each event has a page with a calendar file;
/events/nextalways shows the next one. Labels { }decides every word and the date format, in every language.
