{% comment %} USAGE: {% card_group %} where cards is an iterable of dicts with heading (and, optionally, link and description) optional parameters: columns - 2, 3 or 4 {% endcomment %}
{% for card in cards %}
{% include 'mtp_common/components/card.html' with heading=card.heading link=card.link description=card.description only %}
{% if not forloop.last and forloop.counter|divisibleby:columns %} {# start a new row #}
{% endif %} {% endfor %}