quick question as I can’t seem to get it to work:
I have a blog page where the user can add tags.
Now on an overview page I would like to show all articles that have been marked via checkboxes
I am not sure what you mean, maybe I didn’t make myself clear:
For example:
Blog-Page: How to treat your dog -> tags dog, etc. Playing with your cat -> tags cat, etc.
Now I want to have an overview page, where there are all blog posts listed based on tags of the blog-posts.
So for example one page Dogs.
The user will then, based on all tags of all posts, check which posts are to be shown (= checkboxes)
So then I need to filter all blog-posts by tag
You link does not really help in so far, that I don’t want or need to show all tags that are available, but I want to filter all pages by more than onetag.
One tag is working as per the documentation
Ok, then you want to filter the children of the blog overview page.
So your second example: $items = $page->children()->filterBy('tags', 'in', ['dog', 'cat']);
is almost correct, you just have to change it to using in and the array of tags. The first with $pages cannot work, because $pages refers to all first level pages.
Yes. Single tag is fine. The changing it to „in“ filter (same page, same single search tag, same collection) no results
It also does not change if I add more tags