Not able to add a custom group field to the group hero block

Created on 15 February 2023, over 2 years ago

I created a custom field 'logo' (field_logo) in order to allow users to add a group logo instead of having to rely on the group image field for that, which main purpose is to show the group hero image.

To test this, I looked at group--default--sky.html.twig and copied the code for the description field,
And added a similar code block for the logo:

{% if content.field_logo|render %}
  <div{{ attributes.addClass('card') }}>
    <div{{ content_attributes.addClass('logo') }}>
      {{ content.field_logo }}
    </div>
  </div>
{% endif %}

This actually worked and showed the logo.

However, I want the logo to show together with the Group title in the group hero block.
When I tried to add the same code block to the group--hero-sky.html twig, the logo field does not show up.
{{ content.field_logo }} placed anywhere in that twig file does not render anything.

Please some assistance, thank you.

💬 Support request
Status

Active

Version

11.7

Component

Front-End

Created by

🇳🇱Netherlands Yuri

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

Comments & Activities

Production build 0.71.5 2024