How to display contents of addon in a template file?


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:


  • ‘Broarm\OpeningHours\OpeningHours’

How to show the opening hours in a template file like

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:


For more information about templates:

Thanks, got it working!

1 Like