IXM Banner Hero logic error when checking media types

Created on 22 February 2024, 9 months ago

Problem/Motivation

Steps to reproduce

1 - Use the Banner Hero Block;
2 - Create the block adding just the image file;
3 - Save the block and place it whenever place you want at your page or layout;

Expected Result

The banner should render the image set at the Banner Hero block.

Obtained result

The banner is showing as a video Banner instead a background image.

Proposed resolution

Update the block--ixm-blocks-hero.html.twig

Check the line #55

Update the if condition to:

	{% if item['#paragraph'].field_media_element.0.entity %}
		{% if item['#paragraph'].field_media_element.0.entity.image.entity.uri.value %}

Remaining tasks

No

User interface changes

No

API changes

No

Data model changes

No

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇧🇷Brazil pinesso

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024