PHP 8.6 Is Out: New Features With Examples, and When Joomla Will Use Them Next File Manager 6.1.0: share links, Trash, a phone app and a Health check Next Exams 6.3.0: exam parts, scaled scores, listening and speaking tests Next Restaurant 6.1.0: move your data in, run payroll, and connect other systems
NextSoftware

Advanced

Settings and techniques outside the Studio.

Joomla's Advanced tab

  • Layout: leave it on Default to use the layout chosen in the Studio. Pick another entry to force a layout, or to use a template override (see below).
  • Module Class, Module Style, Header Tag: Joomla's usual module chrome. For the Floating layout, hide the module title and set Module Style to None, so the position does not show an empty box.
  • Caching: safe to leave on. The status and countdown are worked out in the visitor's browser from the full week in the page.

Template overrides

Each layout is a standard Joomla layout file in modules/mod_smartbusinesshours/tmpl/:

File Layout
default.php List
cards.php, minimal.php, badge.php, bar.php, timeline.php Cards, Minimal, Badge, Bar, Timeline
floating.php, offcanvas.php, accordion.php Floating, Offcanvas, Accordion
default_status.php, default_rows.php, default_hours.php, default_notice.php, default_info.php, default_panel.php Shared parts (status, rows, hours, upcoming changes, contact, panel)

To change the HTML:

  1. Go to System > Templates > Site Templates, open your template and choose Create Overrides > Modules > mod_smartbusinesshours.
  2. Edit the copied file in templates/<your template>/html/mod_smartbusinesshours/.

An override of a layout replaces it everywhere. A copy under a new name, for example cards-compact.php, appears in Advanced > Layout as an extra choice. The Studio preview shows your overrides.

Keep the data-sbh-* attributes in your copy: the script uses them to update the status, the countdown and today's highlight.

Styling with CSS

The module is styled through CSS custom properties: --sbh-accent, --sbh-open, --sbh-soon, --sbh-closed, --sbh-text, --sbh-muted, --sbh-background, --sbh-border and --sbh-today for colours, plus sizes such as --sbh-radius, --sbh-gap and --sbh-fs-d / -t / -m (text size per device).

Colours you leave empty in the Studio can be set from a template stylesheet, for every Smart Business Hours module at once:

.sbh {
    --sbh-accent: #7b1fa2;
    --sbh-open: #2e7d32;
}

Colours you set in the Studio, and all sizes, are written on the module element itself and win over a stylesheet. Change those in the Studio, or add !important in your CSS.

Use Design > Custom CSS for CSS that should travel with the module.

Several modules

Each module has its own hours, texts and design, so one site can show several locations or departments. If several modules describe the same business on one page, switch on the LocalBusiness data in only one of them.

The helper plugin

System - NextSoftware Smart Modules draws the Studio preview, connects the Smart modules to YOOtheme Pro and tells nextsoftware.dev which site downloads an update (for your download key). It comes in the Smart Business Hours package, is enabled on install and is shared by all NextSoftware Smart modules. If it is switched off, the module still works on the site; only the Studio preview and the YOOtheme features stop.

Every Smart module package carries a copy of this plugin, and installing an older Smart module never replaces a newer copy. If the plugin and a module are too far apart in age, the module still shows on your site, and Joomla tells you which one to update:

  • On the Control Panel, Modules and Extensions screens: "Smart Business Hours 6.0.0 needs an update to work with the NextSoftware Smart Modules plugin …". Update that module.
  • In the Studio: "The preview needs a newer … plugin". Install the latest package of any Smart module; it brings the newer plugin.

All Extensions