{% regroup links by heading as link_types %} {% for kind in link_types %} {{kind.grouper}} {% endfor %}