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

ISTWCMS-5195: updating card to only show body if present

parent 90d7ef0f
No related branches found
No related tags found
1 merge request!118Feature/istwcms 5195 ebremner node theming
......@@ -11,6 +11,12 @@
{% set show_header = 'yes' %}
{% endif %}
{% if not hero_image and not listing_image and not banner and not content %}
{% set show_body = 'no' %}
{% else %}
{% set show_body = 'yes' %}
{% endif %}
<article class="card{% if type %} card__{{ type }}{% endif %}{% if show_hover %} card--show-hover {% endif %}" >
{% if hero_image and show_header == 'yes' %}
......@@ -20,35 +26,37 @@
} %}
{% endif %}
<div class="card__body">
{% if show_body == 'yes' %}
<div class="card__body">
{% if not hero_image and show_header == 'yes' %}
{% include '@components/card/card-elements/_header.twig' with {
'header': header,
'show_title': show_title,
'type': type
} %}
{% endif %}
{% if not hero_image and show_header == 'yes' %}
{% include '@components/card/card-elements/_header.twig' with {
'header': header,
'show_title': show_title,
'type': type
} %}
{% endif %}
{% if listing_image %}
{% include '@components/card/card-elements/_listing-image.twig' with {
'listing_image': listing_image
} %}
{% endif %}
{% if listing_image %}
{% include '@components/card/card-elements/_listing-image.twig' with {
'listing_image': listing_image
} %}
{% endif %}
{% if banner %}
{% include '@components/card/card-elements/_banner.twig' with {
'banner': banner
} %}
{% endif %}
{% if banner %}
{% include '@components/card/card-elements/_banner.twig' with {
'banner': banner
} %}
{% endif %}
{% if content %}
{% include '@components/card/card-elements/_content.twig' with {
'content': content
} %}
{% endif %}
{% if content %}
{% include '@components/card/card-elements/_content.twig' with {
'content': content
} %}
{% endif %}
</div>
</div>
{% endif %}
{% if footer %}
<div class="card__footer">
......
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