From b3923c7b4dc5a9406800d20fec549eed5a631ad6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 9 Dec 2021 12:00:00 +0000 Subject: [PATCH] feat: show if an event was online --- ...ore.entity_view_display.paragraph.event.default.yml | 10 +++++----- .../opdavies/templates/paragraph--event.html.twig | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/config/core.entity_view_display.paragraph.event.default.yml b/config/core.entity_view_display.paragraph.event.default.yml index 7f9b3ee..fed21ab 100644 --- a/config/core.entity_view_display.paragraph.event.default.yml +++ b/config/core.entity_view_display.paragraph.event.default.yml @@ -29,15 +29,15 @@ content: type: datetime_default region: content field_is_online: - weight: 5 + type: boolean + weight: 4 + region: content label: above settings: - format: default - format_custom_false: '' + format: boolean format_custom_true: '' + format_custom_false: '' third_party_settings: { } - type: boolean - region: content field_link: weight: 1 label: hidden diff --git a/web/themes/custom/opdavies/templates/paragraph--event.html.twig b/web/themes/custom/opdavies/templates/paragraph--event.html.twig index 2475169..d566226 100644 --- a/web/themes/custom/opdavies/templates/paragraph--event.html.twig +++ b/web/themes/custom/opdavies/templates/paragraph--event.html.twig @@ -63,6 +63,12 @@ {% endif %} - {{ content.field_date }} + + {% block trans %} + {% if content.field_is_online.0 %} + (online) + {% endif %} + {% endblock %} {% endblock %} {% endblock paragraph %}