Skip to content
Snippets Groups Projects
Commit 05614b84 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4704: adding logic on node for with out without image class

parent 809e499d
No related branches found
No related tags found
1 merge request!66ISTWCMS-4704: adding date component with ability to handle multiple dates and...
{% if featured_image and node.image.img_element %}
<div class="uw-node__with-image">
{% set node_image_class = 'with-image' %}
{% else %}
{% set node_image_class = 'without-image' %}
{% endif %}
{% include '@components/card/card.twig' with {
'title': node.title,
'sub_title': node.sub_title,
'date': node.date,
'tags': node.tags,
'content': node.content,
'sources': node.image.sources,
'img_element': node.image.img_element,
'image': node.image.uri,
'alt': node.image.alt,
'header_level': 2,
'show_hover': '',
'author': node.author,
'url': node.url,
'modifier_classes': 'node',
'email': node.email,
'phone': node.phone,
'location': node.location,
'link_profile': node.link_profile,
'personal_webpage': node.personal_webpage,
'additional_info': node.additional_info,
'contact_for': node.contact_for,
'groups': node.groups,
'featured_image': featured_image,
} %}
{% if featured_image and img_element %}
</div>
{% endif %}
\ No newline at end of file
<div class="uw-node__{{ node_image_class }}">
{% include '@components/card/card.twig' with {
'title': node.title,
'sub_title': node.sub_title,
'date': node.date,
'tags': node.tags,
'content': node.content,
'sources': node.image.sources,
'img_element': node.image.img_element,
'image': node.image.uri,
'alt': node.image.alt,
'header_level': 2,
'show_hover': '',
'author': node.author,
'url': node.url,
'modifier_classes': 'node',
'email': node.email,
'phone': node.phone,
'location': node.location,
'link_profile': node.link_profile,
'personal_webpage': node.personal_webpage,
'additional_info': node.additional_info,
'contact_for': node.contact_for,
'groups': node.groups,
'featured_image': featured_image,
} %}
</div>
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