Is there a way (via frontmatter preferably) to create a collection excluding pages with a certain custom value in the page-header?
hide_teasers: true
I have some pages (blog-children) that i want to show up only in the rss-feed and not in teasers on the website. I can't get it to work on my blog-index with pagination.
In the template i tried
{% set cleaned = page.collection() %}
{% for p in collection %}
{% if p.header.hide_teasers %}
{% set cleaned = cleaned.remove(p) %}
{% endif %}
{% endfor %}
and then looping through the teasers like
{% for child in cleaned %}
{% include 'partials/blog-list-item.html.twig' with {blog: page, page: child} %}
{% endfor %}
That skips the "hidden" pages but if the limit is 6 and there are 4 hidden pages it only shows 2 teasers of a total of about 20-30 pages.
blog.md frontmatter is set like this atm:
content:
items:
- '@self.children'
limit: 6
order:
by: date
dir: desc
pagination: true
url_taxonomy_filters: true
This page https://learn.getgrav.org/17/content/collections#multiple-collections says, "filter" is not possible with custom header-values. So, how can i achieve what i am looking for?
Any hints or ideas? Thanks in advance.