cgoit/contao-calendar-ical-bundle

iCal support for calendar of Contao OpenSource CMS

Fund package maintenance!
cgoIT
Ko Fi

Installs: 612

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 18

Open Issues: 3

Type:contao-bundle

5.5.0 2025-01-28 14:43 UTC

README

Latest Version on Packagist Dynamic JSON Badge Installations via composer per month Installations via composer total

Contao 4 and Contao 5 Calendar iCal Bundle

iCal support for calendar of Contao OpenSource CMS. Forked from https://github.com/Craffft/contao-calendar-ical-bundle. PHP-8 ready.

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require cgoit/contao-calendar-ical-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Contao 5 support

Starting with version 5 of this bundle Contao 5 is supported.

Export single events as ics

To export a single event as ics (e.g. to give a user the ability to import it into his own calendar) you can add a link to the url /_event/ics-export/{id} where id is the id of the event you want to export. You can also use the route name event_frontend_ics_export in combination with the parameter id for that.

For example you can add the following snippet to your event_full.html5 template.

<a href="<?= $this->route('event_frontend_ics_export', ['id' => $this->id]) ?>" class="ics-export" rel="nofollow" title="Export event as ics">
  <img src="/bundles/cgoitcontaocalendarical/ics.svg" width="32" height="32" alt="">
</a>

Important

If you have overwritten the default difference between start and end date in your localconfig.php via setting a value for $GLOBALS['calendar_ical']['endDateTimeDifferenceInDays'] you have to put this value now into your config.yml.

cgoit_contao_calendar_ical:
    end_date_time_difference_in_days: 365