commit 37d4603d7552382918e1f7675d9942982e8666f2 Author: Dan Smith Date: Sat Mar 29 10:45:40 2014 +0100 713462-field-default-markup-removing-the-divitis-74 diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 178702b..14b0d44 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2457,7 +2457,8 @@ function template_preprocess_field(&$variables, $hook) { // formatters leave them within $element['#items'][$delta]['_attributes'] to // be rendered on the item wrappers provided by field.html.twig. foreach ($variables['items'] as $delta => $item) { - $variables['item_attributes'][$delta] = !empty($element['#items'][$delta]->_attributes) ? new Attribute($element['#items'][$delta]->_attributes) : clone($default_attributes); + $variables['items'][$delta]['value'] = $item; + $variables['items'][$delta]['attributes'] = !empty($element['#items'][$delta]->_attributes) ? new Attribute($element['#items'][$delta]->_attributes) : clone($default_attributes); } } diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig index a2a1485..12ba596 100644 --- a/core/modules/system/templates/field.html.twig +++ b/core/modules/system/templates/field.html.twig @@ -35,20 +35,20 @@
{{ label }}
{% endif %} {% else %} - {% for delta, item in items %} + {% for item in items %} {% if not label_hidden %} -
+
{{ label }}
- {{ item }}
+
{{ item.value }}
{% else %} -
{{ item }}
+
{{ item.attibutes }}
{% endif %} {% endfor %} {% endif %}