Skip to content
Reads ICS Files and shows Events from it via Twig
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
classes
src
vendor added patched Version of om\icalparser Apr 20, 2019
CHANGELOG.md fixed links in blueprints.yaml, removed unused subdirs May 4, 2019
LICENSE
README.md updated Documentation Apr 21, 2019
blueprints.yaml
composer.json
icalendar.php
icalendar.yaml Initial Commit Apr 10, 2019
languages.yaml

README.md

Icalendar Plugin

The Icalendar Plugin is for Grav CMS. It reads an ICS Calendar File and shows an Events List from that Calendar on your Page(s)

Installation

Installing the Icalendar plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.

GPM Installation (Preferred)

The simplest way to install this plugin is via the Grav Package Manager (GPM) through your system's terminal (also called the command line). From the root of your Grav install type:

bin/gpm install icalendar

This will install the Icalendar plugin into your /user/plugins directory within Grav. Its files can be found under /your/site/grav/user/plugins/icalendar.

Manual Installation

To install this plugin, just download the zip version of this repository and unzip it under /your/site/grav/user/plugins. Then, rename the folder to icalendar. You can find these files on GitHub or via GetGrav.org.

You should now have all the plugin files under

/your/site/grav/user/plugins/icalendar

NOTE: This plugin is a modular component for Grav which requires Grav and the Error and Problems to operate.

In Addition, it requires om/icalparser to be installed in same Directory, which is now incorporated - see also the Credits Section below on that.

Admin Plugin

If you use the admin plugin, you can install directly through the admin plugin by browsing the Plugins tab and clicking on the Add button.

Configuration

Before configuring this plugin, you should copy the user/plugins/icalendar/icalendar.yaml to user/config/plugins/icalendar.yaml and only edit that copy.

Here is the default configuration and an explanation of available options:

enabled: true
icsfile: example.ics    # your ics Calendar File (without Path, must be found in user/data/calendars)
numevents: 2    # max, No. of Events to include in List

Note that if you use the admin plugin, a file with your configuration, and named icalendar.yaml will be saved in the user/config/plugins/ folder once the configuration is saved in the admin.

Usage

Once installed and enabled, you can use this Plugin to parse an ICS Calendar File (must be found in user/data/calendars and added to user/config/plugins/icalendar.yaml) and display Events from that Calendar anywhere on your Site using

{{ eventlist() }} 

in the appropriate template (or page, if twig processing is enabled). You can use

<ul></ul>

or

<ol></ol> 

around the shortcut to get the desired List Type. Additionally, you can specify a maximum Numer of Events to be incorporated in the List, just use numevents: XX in config File. Note: The Events List will only show Events in the Future !

Credits

This Plugin requires and depends on om/icalparser - Kudos to Roman Ožana :)

note that icalparser is already incorporated in a patched version which additionally contains 'URL' as a known Icalendar attribute !

To Do

  • add Calendar Widget (not just Events List)
  • evtl. process multiple Calendar (ICS) Files
  • evtl. add Option to also show Events from the Past
You can’t perform that action at this time.