
<div class="card-ctnr {{ include.wrappercss }}" markdown="1">
{% if include.reference %}
    {% assign subpages = site.pages | where: 'parent', include.reference | where: 'tagged', include.tagged | sort: "nav_order" %}
{% else %}
    {% assign subpages = site.pages | where: "parent", page.title | where: 'tagged', include.tagged | sort: "nav_order" %}
{% endif %}

{% for childPage in subpages %}
{% unless childPage.card_exclude %}
{% if childPage.card_url %}
    {% assign url = site.baseurl | append: childPage.card_url %}
{% else %}
    {% assign url = site.baseurl | append: childPage.url %}
{% endif %}

{% include card_layout page=childPage lk=url %}

{% endunless %}
{% endfor %}

</div>