{% if cfield_data.items|length > 0 %}
  <div class="castorcito--field-advanced-container castorcito--field">
    {% for item in cfield_data.items %}
      <div class="castorcito-advanced-container--item">
        {% if item.head.fields|length > 0 %}
          <div class="head">
            {% for cfh_key,cfield_head in item.head.fields %}
              {% if cfield_head.value is not empty%}
                {% embed cfield_plugins[cfield_head.type].module_name ~ ':castorcito_' ~ cfield_head.type with {
                  cfield_data: cfield_head,
                  cfield_display_settings: cfield_display_settings.head[item.head.type].cfields[cfh_key]
                } %}
                {% endembed %}
              {% endif %}
            {% endfor %}
          </div>
        {% endif %}
        {% if item.body.fields|length > 0 %}
          <div class="body">
            {% for cfb_key,cfield_body in item.body.fields %}
              {% if cfield_body.value is not empty%}
                {% embed cfield_plugins[cfield_body.type].module_name ~ ':castorcito_' ~ cfield_body.type with {
                  cfield_data: cfield_body,
                  cfield_display_settings: cfield_display_settings.body[item.body.type].cfields[cfb_key]
                } %}
                {% endembed %}
              {% endif %}
            {% endfor %}
          </div>
        {% endif %}
      </div>
    {% endfor %}
  </div>
{% endif %}