Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

ICS Link Field

No security coverage Under active development 332 sites

This module creates downloadable .ics calendar files for specific content entities. It provides an "ICS Link" field type that can be added to content types to configure event details using tokens from other fields, generating calendar files on demand without storing them.

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.

Drupal 8–10 · not 11

Ask your assistant about ICS Link Field

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • token Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Aug 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
2.0.0 Stable 8–10 Feb 20, 2024
2.0.x-dev Dev 8–10 Feb 20, 2024
8.x-1.0-alpha7 Pre-release 8–10 Nov 18, 2023
8.x-1.0-alpha6 Pre-release 8–9 Aug 9, 2023