Skip to content
Snippets Groups Projects
Commit 39500dd4 authored by Eric Bremner's avatar Eric Bremner Committed by Kevin Paxman
Browse files

ISTWMCS-5880: adding media classes to node

parent 006e94fd
No related branches found
No related tags found
1 merge request!48ISTWCMS-5880: ensuring that title displays when banner is used
{% if node.media or node.image %} {% if media_flags.has_media %}
{% set node_image_class = 'with-image' %} {% set node_image_class = 'with-media' %}
{% else %} {% else %}
{% set node_image_class = 'without-image' %} {% set node_image_class = 'without-media' %}
{% endif %} {% endif %}
{% set modifier_classes = 'node--' ~ node.bundle %} {% set modifier_classes = 'node--' ~ node.bundle %}
......
<article class="card{% if type %} card__{{ type }} {% endif %}{% if modifier_classes %} card__{{ modifier_classes }}{% endif %}{% if show_hover %} card--show-hover{% endif %}" {% if type == 'banner' %} id="{{ type }}{{ loop.index }}-{{ banners.uuid }}"{% endif %}> <article class="card{% if type %} card__{{ type }} {% endif %}{% if modifier_classes %} card__{{ modifier_classes }}{% endif %}{% if show_hover %} card--show-hover{% endif %}" {% if type == 'banner' %} id="{{ type }}{{ loop.index }}-{{ banners.uuid }}"{% endif %}>
{% if media_flags.has_media %} {% if media_flags.has_media and media.media is not empty %}
{% include '@components/card/card-elements/_media.twig' with { {% include '@components/card/card-elements/_media.twig' with {
'media': media, 'media': media,
'header': header, 'header': header,
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
} %} } %}
{% endif %} {% endif %}
{% if image and bundle != 'uw_ct_profile' %} {% if image is not empty and bundle != 'uw_ct_profile' %}
image
{% include '@components/card/card-elements/_image.twig' with { {% include '@components/card/card-elements/_image.twig' with {
'image': image 'image': image
} %} } %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment