<ul class="itemLevel{{itemLevel}} list {% if itemLevel > 1 %}closed{% endif %}">
{% for item in items %}
  {% if item.subitems is defined and item.subitems|length > 0 %}
    {% for subitem in item.subitems %}
    <li>
      {% include "MapbenderCoreBundle::metadata_item.html.twig"  with {'items': subitem, 'itemLevel': itemLevel + 1 }%}
    </li>
    {% endfor %}
  {% else %}
    {% for key,val in item %}
    {% set vt=prefix~section.title~'.'~key %}
    <li>
        <div class="labelText">{{ vt | trans}}:</div>
        {% if (vt == 'mb.wms.metadata.section.common.originUrl') or (vt == 'mb.wms.metadata.section.common.onlineResource') %}
            <div class="metaText"><a href="{{ val }}" target="_BLANK">{{ val }}</a></div>
        {% elseif (vt == 'mb.wms.metadata.section.contact.electronicMailAddress') %}
            <div class="metaText"><a href="mailto:{{ val }}">{{ val }}</a></div>
        {% else %}
            <div class="metaText">{{ val }}</div>
        {% endif %}
        <div class="clearContainer"></div>
    </li>
    {% endfor %}
  {% endif %}
{% endfor %}
</ul>