huubl
30 March 2019 14:03
1
Hi,
I want to use this addon: GitHub - TheBnl/silverstripe-openinghours: Add opening hours to a DataObject . I added the addon into the admin settings page by adding this to my yaml file:
SilverStripe\SiteConfig\SiteConfig:
extensions:
‘Broarm\OpeningHours\OpeningHours’
How to show the opening hours in a template file like page.ss?
odnoc
5 April 2019 22:10
2
In your template, use the names of the methods listed at the bottom of the module’s home page. If the name starts with “get”, leave that off. Examples:
$IsClosed
$IsOpenNow
$OpeningHoursToday
For more information about templates: https://docs.silverstripe.org/en/4/developer_guides/templates/