Skip to content

Commit

Permalink
EWPP-164: Fix TextFeaturedMedia pattern template.
Browse files Browse the repository at this point in the history
  • Loading branch information
drishu committed Jan 17, 2021
1 parent 820ebae commit 9bcf38d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
* Text with featured media.
*/
#}
{% if title %}
<h2 class="ecl-u-type-heading-2 ecl-u-mt-2xl ecl-u-mt-md-3xl ecl-u-mb-l">{{ title }}</h2>
{% endif %}
{% set text = text|render %}

{% if media.image or media.video or text %}
{% if title %}
<h2 class="ecl-u-type-heading-2 ecl-u-mt-2xl ecl-u-mt-md-3xl ecl-u-mb-l">{{ title }}</h2>
{% endif %}
<div class="ecl-row">
{% if media.image or media.video %}
<div class="ecl-col-md-6 ecl-u-order-md-last ecl-u-mb-m ecl-u-mb-md-none">
Expand Down
3 changes: 1 addition & 2 deletions tests/Kernel/fixtures/rendering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2612,8 +2612,7 @@
'img.ecl-media-container__media[src="http://via.placeholder.com/150x150"]': 0
'div.ecl-media-container__media--ratio-16-9 iframe': 0
'figcaption.ecl-media-container__caption': 0
equals:
'h2.ecl-u-type-heading-2': "Heading"
'h2.ecl-u-type-heading-2': 0
- array:
'#type': pattern
'#id': text_featured_media
Expand Down

0 comments on commit 9bcf38d

Please sign in to comment.