Opening hours
Import
Opening hours are imported as inline database records (one row per weekday and time span, with an optional validity range). You do not work with those rows directly: the attraction computes display-ready shapes from them, and the extension ships one partial per shape for direct use or adaption as needed.
Display options
Three display options are available. Pick one for your Tourist template; the
shipped stub renders all three side by side so you can compare them against real data.
| Partial | Accessors | Displays |
|---|---|---|
Opening | per, special | Every weekday on its own line, closed days included. |
Opening | merged, special | Weekdays with identical hours on one line, listed one by one. |
Opening | merged, special | Like Merged, consecutive days collapsed into ranges. |
Each display has two accessors: the first holds the regular hours, the special one the deviating
hours, for example public holidays. Render the partial once for each.
For an attraction open Monday to Friday 10:00–18:00 and Saturday 10:00–14:00, the three displays show:
Monday: 10:00–18:00
Tuesday: 10:00–18:00
Wednesday: 10:00–18:00
Thursday: 10:00–18:00
Friday: 10:00–18:00
Saturday: 10:00–14:00
Sunday: closed
Monday, Tuesday, Wednesday, Thursday, Friday: 10:00–18:00
Saturday: 10:00–14:00
Monday–Friday: 10:00–18:00
Saturday: 10:00–14:00
PerDayTable
<f:render partial="OpeningHours/PerDayTable" arguments="{
openingHours: attraction.perDayTable,
heading: 'LLL:EXT:thuecat/Resources/Private/Language/locallang.xlf:content.openingHours'
}" />
<f:render partial="OpeningHours/PerDayTable" arguments="{
openingHours: attraction.specialPerDayTable,
heading: 'LLL:EXT:thuecat/Resources/Private/Language/locallang.xlf:content.specialOpeningHours'
}" />
- All seven weekdays are always listed, Monday first. A day without hours shows as closed.
- A day with several spans lists them all, separated by commas, for example `
08:`.00–12: 00, 13: 00–18: 00 - Public holidays appear as a last line only when upstream supplies hours for them.
Choose it when visitors should see at a glance on which days the attraction is closed.
MergedByWeekday
<f:render partial="OpeningHours/MergedByWeekday" arguments="{
openingHours: attraction.mergedByWeekday,
heading: 'LLL:EXT:thuecat/Resources/Private/Language/locallang.xlf:content.openingHours'
}" />
<f:render partial="OpeningHours/MergedByWeekday" arguments="{
openingHours: attraction.specialMergedByWeekday,
heading: 'LLL:EXT:thuecat/Resources/Private/Language/locallang.xlf:content.specialOpeningHours'
}" />
- Weekdays sharing exactly the same spans form one line. The days need not be adjacent: `
Monday, Wednesday, Friday: 08:` is one line.00–12: 00 - Closed days are left out entirely. Nothing says that the attraction is closed on Sunday; the day is simply missing.
- Public holidays always form a line of their own, last, even when their hours match a weekday group.
Choose it for compact output where the hours are regular.
MergedByWeekdayRanges
<f:render partial="OpeningHours/MergedByWeekdayRanges" arguments="{
openingHours: attraction.mergedByWeekday,
heading: 'LLL:EXT:thuecat/Resources/Private/Language/locallang.xlf:content.openingHours'
}" />
<f:render partial="OpeningHours/MergedByWeekdayRanges" arguments="{
openingHours: attraction.specialMergedByWeekday,
heading: 'LLL:EXT:thuecat/Resources/Private/Language/locallang.xlf:content.specialOpeningHours'
}" />
This partial uses the same accessors and the same grouping as Merged. The only
difference is how a line names its days: a run of consecutive days is shortened to its first and
last day.
Monday, Tuesday, Wednesday, Thursday,
Friday
becomes
Monday–Friday
; a group of Monday, Tuesday and Thursday becomes
Monday–Tuesday, Thursday
.
Closed days and public holidays behave as in Merged. Ranges do not wrap around the
week: Sunday and Monday are never joined.
What all partials share
All three partials take the same two arguments:
================== ========================================================== Argument Meaning
================== ========================================================== opening One
of the accessors listed for that partial. heading A translation key for the section heading.
================== ==========================================================
The partials render nothing when there are no hours, so an empty section and its heading never appear. This is what lets you render the special hours unconditionally.
Opening hours can be limited to a validity range, for example summer and winter hours. Every partial handles them the same way:
- Each range is rendered as a block of its own, headed by its dates (
01., a start date alone, or04. 2026 – 31. 10. 2026 until 31.). Hours without a range get no date line.10. 2026 - Ranges that have ended are not shown.
- The range covering today comes first. Later ranges follow by start date, each marked Upcoming.
Weekday names, closed, Upcoming and until come from
EXT:thuecat/Resources/Private/Language/locallang.xlf, keys content.
and content..
Important
Which range is current, which ranges have ended, and therefore what the partials show, is decided when the page is rendered. The detail page is cached, so the output stays as it was rendered until its page cache entry expires or is cleared.
Writing your own partial
Override a partial through partial as described in Frontend output, keeping its
name, or add one of your own. The accessors provide the following shapes.
per and special:
periods[] validFrom, validThrough (both optional), current
weekDays[] dayOfWeek, closed
timePeriods[] opens, closes
merged and special:
periods[] validFrom, validThrough (both optional), current
weekDayGroups[] daysOfWeek (list of day names)
dayRanges[] firstDay, lastDay, range
timePeriods[] opens, closes
day, days, first and last hold the English day name (Monday …
Sunday, Public), which is the suffix of the weekday translation key. opens and
closes are date objects; format them with
f:. range is
false for a single day.
Note
Both shapes also carry open. It is evaluated in the server's time zone when the page is
rendered and then cached with the page, so it is not reliable for visitors. Resolve the current
open or closed state client-side if you need it.