Get a collection of all "CHILDREN" but only with a special "TAG"

I would like to show a collection of all “CHILDREN” pages with a special “TAG”

For now i use this collection:

{% set items = page.collection({'items':{'@self.children': '{{item.title}}'}, 'limit': '6','order': {'by': 'default', 'dir': 'asc'}}) %}
      {% for item in items %}
        <a href='{{item.url}}' class='{{item.title|lower|replace({'ä': "ae", 'ö': "oe", 'ü': "ue", 'ß': "ss", '.': "-"})}} cell'>{{item.title}}
        <img src="/images/inspiration/kachel-nav/{{item.title|lower|replace({'ä': "ae", 'ö': "oe", 'ü': "ue", 'ß': "ss"})}}.jpg" alt="">
        </a>
      {% endfor %}

But here i would like to filter these Items only whit the tag: “top”

So i would like to combine @self.children & @taxonomy but i think it will not work.

Any suggestions? Is this possible?

1 Like

I do a similar thing to find all ‘featured’ posts, here is my Twig:

{% for post in taxonomy.findTaxonomy({'tag': "featured"}) %}
 {% include 'partials/blog_item.html.twig' with {'page':post, 'truncate':true} %}
{% endfor %}

And here is another method I use:

{% for child in collection %}
  {% if "featured" in child.taxonomy['tag'] %}
    {% include 'partials/blog_item.html.twig' with {'blog':page, 'page':child, 'truncate':true} %}
  {% endif %}
{% endfor %}

Maybe the above might be of help?