Skip to content

Commit

Permalink
Update to accommodate Story content type
Browse files Browse the repository at this point in the history
  • Loading branch information
occupant committed Dec 3, 2024
1 parent f2fffb3 commit 1edd37d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions templates/content/node--card-horizontal.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 %}
<p class="mt-2">{{ summary }}</p>
Expand Down
9 changes: 9 additions & 0 deletions templates/content/node--card-image.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 %}
Expand Down
9 changes: 9 additions & 0 deletions templates/content/node--card-vertical.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 %}
<p class="mt-2">{{ summary }}</p>
Expand Down

0 comments on commit 1edd37d

Please sign in to comment.