Documentation: Opening Hours module
Content plugin
Unlock this and other features by upgrading to Joomill Opening Hours PRO
Go PRO
Opening Hours module v6.1.0 or later is required
The Opening Hours content plugin lets you show, hide and insert live opening-hours information anywhere content plugins run: articles, custom HTML modules, and the module's own open/closed messages. Add the tags below to your content; the plugin replaces them when the page is displayed.
Configuration is not applicable: just enable the plugin and you are good to go!
When you use this a custom HTML module, make sure you enable the prepare content option in the options tab of the custom HTML module.
Conditional blocks
Show or hide a block of content based on the current status:
{openinghours status="open"}…{/openinghours}shown only when currently open{openinghours status="closed"}…{/openinghours}shown only when currently closed{opentoday}…{/opentoday}shown when open at some point today{closedtoday}…{/closedtoday}shown when closed all day today{exceptionaltoday}…{/exceptionaltoday}shown when today is an exceptional/holiday date{closingsoon}…{/closingsoon}shown only when currently open and within the "closing soon" threshold
Tokens placed inside these blocks are processed as well.
Inline tokens
{statuslabel} |
A short status word: Open, Closed, Closing soon or On a break |
{nextchange} |
The next change as a time (closing time when open; next opening time, with day if not today, when closed) |
{countdown} |
A live countdown to the next change (e.g. `in 30 min`); updates automatically in the browser |
{reopensat} |
The reopening time during a lunch break; empty otherwise |
{opentime} / {closetime} |
Today's first opening / closing time |
{opentime2} / {closetime2} |
Today's second opening / closing time (lunch break) |
{currentdate} / {currenttime} |
The current date / time. Accept an optional `format="…"` attribute |
Multiple modules
optional: When you have multiple modules, you can target a specific module with module="MODULE-ID".
Example: {opentime module="114"}
Date- and Timeformat
The date- and timeformat used in this plugin is based on the settings of the module. you can override this with the format-attribute inside the tag.
Example: {currentdate format="d-m-Y"}
Example: {closetime format="H:i"}
Examples
- Urgency call to action: `Order now, {countdown} open!`
- A notice that shows and hides itself: `{closingsoon} Last orders, we close {countdown}!{/closingsoon}`
- A status badge: `Status: {statuslabel}`
- A smart closed notice: `{openinghours status="closed"}We open again {nextchange}.{/openinghours}`
- Break communication: `{openinghours status="closed"}On a break, back at {reopensat}.{/openinghours}`
The `{countdown}` token keeps ticking live inside articles too. The opening-hours logic accounts for regular hours, holiday/exceptional dates, overnight hours and lunch breaks, so the tokens are correct in every situation.