{% capture nowunix %}{{'now' | date: '%s'}}{% endcapture -%} {% assign event_uuid = 0 -%} {% assign project_events = site.events | where_exp: "event", "event.projects contains p_tag" -%} {% for event in project_events -%} {% if event.projects contains p_tag -%} {% capture event_start %}{{event.eventdate | date: '%s' }}{%- endcapture -%} {% if event_start > nowunix -%} {% if event_uuid == 0 -%} {% assign event_uuid = event.uid -%} {% endif -%} {% endif -%} {% endif -%} {% endfor -%} {% if event_uuid != 0 -%} {% for project in site.projects -%} {% if project.tag == p_tag -%}
{{project.short}}
{% endif -%} {% endfor -%} {% endif -%} {% assign events = site.events | where: "uid", event_uuid -%} {% for event in events -%} Nächster Termin: {{event.title}}, {{event.eventdate | date: '%d.%m.%Y %H:%M'}}
{{event.short}}