@rustark, It seems you want to have a collection of pages which are the children of a specific route, but only if author equals some name. Correct?
Have a look at the documentation on Page Collections.
You can define a collection in the header of the page, like:
content:
items:
'@page.children': '/articles'
or dynamically in Twig:
{% set collection = page.evaluate([{'@page.children':'/articles'}]) %}
To address your specific question, the following will create:
- a collection 'coll1' of all children below '/articles'
- a collection 'coll2' of all pages with taxonomy of specific author
- a collection 'pages' which is the intersection of the two yielding all pages below '/article' which have the correct author.
{% set author = 'an author' %}
{% set coll1 = page.evaluate({'@page.children':'/articles'}) %}
{% set coll2 = page.evaluate({'@taxonomy': {'author': author}}) %}
{% set pages = coll1.intersect(coll2) %}
The pages contain the following header:
taxonomy:
author: 'an author'
last edited 01/13/20 by pamtbaau