This project is not covered by Drupal’s security advisory policy.

Synopsis

This module generates .ics files for the specific entity on request, and doesn't store anything to a file or database (other than the configuration needed).

In order to store configuration for a (fieldable) entity/bundle, the module provides a new (computed) Field Type named "ICS Link", and it's own formatter (optional) & widget (should always be hidden).

Recommended modules

  • Datetime (core): Makes it easier to add dates/times for module's configuration

Known problems

Although the module is 100% computed, the field still needs to save a line in the database, contrary what is written in the database for FieldItemInterface::schema ("An empty array if there is no schema"). So a dummy line is saved instead.

See also:
https://www.drupal.org/project/drupal/issues/2986836
https://www.drupal.org/project/drupal/issues/2932273

Similar projects

  • ics_field: This module is mainly used to send the ics file via email and needs to generate an ~UNMANAGED~ copy of the file programmatically. It has no configuration and cannot be used to generate files on request.
  • simple_ics: This module also doesn't offer any configuration, and everything must be passed on the URL, which must be added to a twig template

Dependencies

  • Token (included in composer.json and in module's info.yml file)
  • eluceo/ical (included in composer.json)

Installation

Install as you would normally install a contributed Drupal module. See: https://drupal.org/documentation/install/modules-themes/modules-8 for further information.

Configuration

  • On your entity/bundle (e.g. a node content type) add a field of the type "ICS Link" & configure the fields based on your events. Tokens with other fields' data may be used.
  • On "Manage form display" you can exclude field's widget, as it will not display anything.
  • (Optionally) if you want the entity to display a link to generate the ICS, you can add/configure the formatter on "Manage display" tab.

Restrictions

FAQ

How are multi day events handled?

  • If the event doesn't have start/end time, then a single "all day" event will be created.
  • If the event has start/end time, then this module creates multiple single day events with this start & end time, as this approach made more sense to us.

    E.g. The event is Drupalcon Barcelona 2020, which takes place from 14 to 17 of Sept 2020, and has starting time 09:00 and end 18:00.
    The module will generate an ics file with 4 single day events (14/9-15/9-16/9-17/9) each starting from 09:00 and ending on 18:00.

We are thinking of a way to enable more flexibility (e.g. repeating events etc), while not making the module hard to use.

Supporting organizations: 
Initial Module, Contribution of work hours until mid 2020

Project information

Releases