d8-calendar-ror/templates/calendar.ics.twig
root ccbd9d2679 FIX unsupported space after colon
also, added DTEND for easier parsing by some library
2018-11-04 11:43:19 +01:00

16 lines
491 B
Twig

BEGIN:VCALENDAR
PRODID:drupal-calendar-ror
VERSION:2.0
{% for nid, node in ror.calendar.nodes %}
BEGIN:VEVENT
SUMMARY:{{node.title.0.value}}
UID:node-{{node.nid.0.value}}@www.ondarossa.info
DTSTAMP:{{node.created.0.value|date("Ymd\\This")}}Z
DTSTART:{{node.field_data_evento.0.value|date("Ymd\\THis")}}Z
DURATION:PT1H
DTEND:{{node.field_data_evento.0.value|date_modify("+1 hour")|date("Ymd\\THis")}}Z
URL:http://www.ondarossa.info{{node.path.0.alias}}
END:VEVENT
{% endfor %}
END:VCALENDAR