{% for category, files in file_categories.items() %}
{{ category }}/
{% if category == "tasks" %}
{% set ns = namespace(grouped=[]) %}
{% for f in files %}
{% if f.task_title %}
{% set ns.grouped = ns.grouped + [f] %}
{% endif %}
{% endfor %}
{% if ns.grouped %}
{% set fi = namespace(tid='', total=0) %}
{% for f in ns.grouped %}
{% set is_new = fi.tid != f.task_short_id %}
{% if is_new %}
{% if fi.tid %}
{% if fi.total > 3 %}
{% endif %}
{% endif %}
{% set fi.tid = f.task_short_id %}
{% set fi.total = f.task_file_count %}