{% include 'partials/head' %} {% include 'partials/flash' %}
{% for pair in resources %} {% assign name = pair[0] %} {% assign resource = pair[1] %}

{{name | capitalize}}

{% assign resourceJSON = resource.data[0][resource.groupBy] | stringify %} {% if resource.groupBy and resourceJSON != "{}" %} {% assign i = 0 %} {% for item in resource.data %} {% for pair in item[resource.groupBy] %} {% assign group = pair[0] %} {% assign members = pair[1] %}

{% assign group_parts = group | split: "-" %} {% for name_part in group_parts %} {{ name_part | capitalize }} {% endfor %}

    {% for data in members %} {{data.title}} {% endfor %}
{% endfor %} {% endfor %} {% else %} {% assign resourceJSON = resource.data[0] | stringify %} {% if resourceJSON != "[]" %}
    {% for data in resource.data %} {% if resource.display == 'image' %}
    {% else %} {{ data[resource.title] }} {% if resource.subtitle %} - {{ data[resource.subtitle] }} {% endif %} {% endif %}
    {% endfor %}
{% endif %} {% endif %}
{% endfor %}
{% include 'partials/tail' %}