diff --git a/config/sync/core.entity_view_display.node.stanford_person.default.yml b/config/sync/core.entity_view_display.node.stanford_person.default.yml index 09a652b1c..868f4e9cd 100644 --- a/config/sync/core.entity_view_display.node.stanford_person.default.yml +++ b/config/sync/core.entity_view_display.node.stanford_person.default.yml @@ -312,7 +312,7 @@ third_party_settings: field_label: label_class: '' label_value: '' - label_tag: h3 + label_tag: '' weight: 9 additional: { } a69dd40a-c1a3-4266-b0ce-7efdaaa137fe: @@ -386,7 +386,7 @@ third_party_settings: field_label: label_class: '' label_value: '' - label_tag: h3 + label_tag: '' weight: 5 additional: { } 0cff0fa4-edcc-4bae-93bf-865242051b35: diff --git a/themes/stanford_basic/templates/core/field.html.twig b/themes/stanford_basic/templates/core/field.html.twig index 8c0874615..1ae9a8f5e 100755 --- a/themes/stanford_basic/templates/core/field.html.twig +++ b/themes/stanford_basic/templates/core/field.html.twig @@ -1,5 +1,3 @@ -{% extends "@stable9/field/field.html.twig" %} - {# Create classes array #} {% set classes = [] %} @@ -11,3 +9,38 @@ #} {% set attributes = attributes.addClass(classes) %} + +{% + set title_classes = [ + label_display == 'visually_hidden' ? 'visually-hidden', +] +%} +{% set label_tag = label_tag|default('div') %} + + +{% if label_hidden %} + {% if multiple %} + + {% for item in items %} + {{ item.content }} + {% endfor %} + + {% else %} + {% for item in items %} + {{ item.content }} + {% endfor %} + {% endif %} +{% else %} + + <{{ label_tag }}{{ title_attributes.addClass(title_classes) }}>{{ label }} + {% if multiple %} +
+ {% endif %} + {% for item in items %} + {{ item.content }}
+ {% endfor %} + {% if multiple %} + + {% endif %} + +{% endif %}