Skip to main content
Version: 11.x

iCal

The iCal template data source can be used to show data from an ical-formatted data file. Data is updated every 10 minutes.

Requirements​

  • A Smartsign iCal template data source license
  • An iCal file at a public HTTPS URL ending in .ics, without authentication. The iCal-file is fetched by Smartsign Cloud.
  • Screens must be able to reach https://bookingapi.smartsigncloud.com

iCal data source configuration​

Set iCal link and Locations on the datasource. Set Filter events by time, Show expired bookings, Show progress and Data transformation script in Template Creator under Datasource settings for this template.

Setting

Description

Example

iCal link

Public address in iCal format

https://calendar.com/calendar/ical/calendarid/public/basic.ics

Locations

Available locations load automatically when you enter the iCal link. Select one or several locations to filter events, or leave the selection empty to include all locations.

Room 2

Filter events by time

Choose Today (default) or All.

Today

Show expired bookings

Determines if bookings continue showing after they have ended

Disabled

Show progress

Enables the template progress indicator. Off by default.

Disabled

Data transformation script

Careful! Programming knowledge required.

It's possible to transform/manipulate the data before showing it by providing a script here.

The iCal data is available in the variable "input"

Moment.js is available to work with date/time.

The function must return the data when the transformation is completed.

function(input, moment) {

            for(var i=0; i < input.bookings.length; i++) {

                        if(input.bookings[i].name && input.bookings[i].name.indexOf('(all day)') >= 0) {

                                    input.bookings[i].name = input.bookings[i].name.replace('(all day)','');

                                    input.bookings[i].datestart = moment(input.bookings[i].datestart).startOf('day');

                                    input.bookings[i].dateend = moment(input.bookings[i].dateend).endOf('day');

                        }

            }

            return input;

}

Available text bindings are Booking - Name, Booking - Location, Booking - Building, Booking - Description, Booked by, Booking - Start date, Booking - End date, Booking - Start time, Booking - End time and Last update time. Date and time formats can be configured for their bindings.