formatter-suite-field-list.html needs clearfix

Created on 19 October 2023, about 1 year ago
Updated 13 July 2024, 5 months ago

Problem/Motivation

Fields formatted with General Entity Reference Formatter with style single-line run together with other fields on the same line.

Steps to reproduce

Create an entity reference field, and a text field. Place the text field after the entity reference field. Chose the "General Entity Reference" for the formatter, set parameters for single line. View resulting rendered content.

Proposed resolution

Modify the twig template formatter-suite-field-list.html to add the clearfix class to the outer div:

...
%}

{% set itemsLength = items|length %}
{% set itemsIndex = 1 %}
<div{{ attributes.addClass(classes|merge(['clearfix'])) }}>
  {% if label_hidden == false %}
    <div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
  {% endif %}
  {% if list_style == 'ul' %}
...

Remaining tasks

Modify the code.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada sdsheridan Toronto

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

Comments & Activities

Production build 0.71.5 2024