Newer
Older
pre-www / src / blocks / cards.twig
<div class="cards-container">
    <div class="cards-container__inner">
    {% if block.cards.id != null %}
        {% for id in block.cards.id %}
            {% set card = post_type[~block.cards.post_type~].items[~id~] %}
            {% include "../layout/partials/card.twig" with {"card": card } %}
        {% endfor %}
    {% else %}
        {% for card in block.cards.items %}
            {% include "../layout/partials/card.twig" with {"card": card } %}
        {% endfor %}
    {% endif %}
    </div>
</div>