From 1edd37dba089a5af51a05d6c1e816fa60d7c52c0 Mon Sep 17 00:00:00 2001 From: James O'Toole Date: Tue, 3 Dec 2024 14:57:29 -0800 Subject: [PATCH] Update to accommodate Story content type --- templates/content/node--card-horizontal.html.twig | 9 +++++++++ templates/content/node--card-image.html.twig | 9 +++++++++ templates/content/node--card-vertical.html.twig | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/templates/content/node--card-horizontal.html.twig b/templates/content/node--card-horizontal.html.twig index be985c0..f121441 100644 --- a/templates/content/node--card-horizontal.html.twig +++ b/templates/content/node--card-horizontal.html.twig @@ -87,6 +87,12 @@ {% set link_url = exturl %} {% set link_target = true %} {% endif %} +{% if not (node.field_story_page_external_link.isEmpty == true) and content.field_story_page_external_link is defined %} + {% set exturl = content.field_story_page_external_link[0]['#url']|raw %} + {% set exttitle = content.field_story_page_external_link[0]['#title']|raw %} + {% set link_url = exturl %} + {% set link_target = true %} +{% endif %} {% embed 'kraken:card--primary' with { title: label, @@ -109,6 +115,9 @@ {% if not (node.field_announcement_feature_image.isEmpty == true) and content.field_announcement_feature_image is defined %} {{ content.field_announcement_feature_image.0 }} {% endif %} + {% if not (node.field_story_page_image.isEmpty == true) and content.field_story_page_image is defined %} + {{ content.field_story_page_image.0 }} + {% endif %} {% endblock %} {% block content %}

{{ summary }}

diff --git a/templates/content/node--card-image.html.twig b/templates/content/node--card-image.html.twig index 5cc6dce..69bc7e1 100644 --- a/templates/content/node--card-image.html.twig +++ b/templates/content/node--card-image.html.twig @@ -87,6 +87,12 @@ {% set link_url = exturl %} {% set link_target = true %} {% endif %} +{% if not (node.field_story_page_external_link.isEmpty == true) and content.field_story_page_external_link is defined %} + {% set exturl = content.field_story_page_external_link[0]['#url']|raw %} + {% set exttitle = content.field_story_page_external_link[0]['#title']|raw %} + {% set link_url = exturl %} + {% set link_target = true %} +{% endif %} {% embed 'kraken:card--image' with { title: label, @@ -108,6 +114,9 @@ {% endif %} {% if not (node.field_announcement_feature_image.isEmpty == true) and content.field_announcement_feature_image is defined %} {{ content.field_announcement_feature_image.0 }} + {% endif %} + {% if not (node.field_story_page_image.isEmpty == true) and content.field_story_page_image is defined %} + {{ content.field_story_page_image.0 }} {% endif %} {% endblock %} {% block content %} diff --git a/templates/content/node--card-vertical.html.twig b/templates/content/node--card-vertical.html.twig index 21a3c2f..de0f6e6 100755 --- a/templates/content/node--card-vertical.html.twig +++ b/templates/content/node--card-vertical.html.twig @@ -87,6 +87,12 @@ {% set link_url = exturl %} {% set link_target = true %} {% endif %} +{% if not (node.field_story_page_external_link.isEmpty == true) and content.field_story_page_external_link is defined %} + {% set exturl = content.field_story_page_external_link[0]['#url']|raw %} + {% set exttitle = content.field_story_page_external_link[0]['#title']|raw %} + {% set link_url = exturl %} + {% set link_target = true %} +{% endif %} {% embed 'kraken:card--primary' with { title: label, @@ -109,6 +115,9 @@ {% if not (node.field_announcement_feature_image.isEmpty == true) and content.field_announcement_feature_image is defined %} {{ content.field_announcement_feature_image.0 }} {% endif %} + {% if not (node.field_story_page_image.isEmpty == true) and content.field_story_page_image is defined %} + {{ content.field_story_page_image.0 }} + {% endif %} {% endblock %} {% block content %}

{{ summary }}