{% for group in footer_items if group.child_items %} {# 2 columns to every 5 links, so 5 links get 2 columns, 5-10 links get 4 columns, and so on #} {%- set cols = frappe.utils.ceil((group.child_items | len) / 5) * 2 -%}
{%- if group.icon -%} {{ group.label }} {%- else -%} {{ group.label }} {%- endif -%}
    {%- for child in group.child_items -%}
  • {%- if child.icon -%} {{ child.label }} {%- else -%} {{ child.label }} {%- endif -%}
  • {%- endfor -%}
{% endfor %}