feat: re-add links to event names

When there is a link to an event, make the event name clickable so that
visitors can find out more about that specific event.
This commit is contained in:
Oliver Davies 2021-12-09 08:45:43 +00:00
parent 73086d4ab3
commit d47b518082

View file

@ -49,7 +49,13 @@
{% block paragraph %} {% block paragraph %}
<div{{ attributes.addClass(classes) }}> <div{{ attributes.addClass(classes) }}>
{% block content %} {% block content %}
{{ content.field_name }} {% set eventLink = content.field_link.0 %}
{% if eventLink %}
{{ link(content.field_name, eventLink['#url_title'], { class: 'inline-block' }) }}
{% else %}
{{ content.field_name }}
{% endif %}
{% if content.field_location.0 is not empty %} {% if content.field_location.0 is not empty %}
{{ 'in'|t }} {{ 'in'|t }}