I want to have a list of articles that could be located anywhere throughout the website with a particular tag associated to it. I don't want to have to have a specific query for each and every tag however.
So I have a page - with a page listing rendering added to it. It's source type is set to an Item query:
I know how to have a static query for one particular tag:
But that would mean having to create a new item query for every tag that I wanted to filter on.
I had tried to get the sxa token to work in an item query ie:
But it always returns no results (even though my indexed data has the appropriate tags in its data).
I also tried using Search scope
but scope doesn't seem to be able to be associated to a page listing. Tried using the search results rendering - but that seems to require a base search query, and my page will not have a search querystring to drive a search which could then be filtered to sxa tag.
I would have thought that there was a way of displaying a list associated to an sxa tag without having to write custom code so I'm hoping I've missed something obvious.
Additional Information. My listing page is the generic page template that came out of the box as Page - and inherits _Searchable. My article page is a custom template type. It inherits all the SXA base templates that the Page out of the box came with. So it also inherits from _Searchable.
My tags are defined under my SXA Site/Data/Tags item:
My page that conatins the listing has this tag.
These items are indexed with the tag data in the SXA Master index. But my query is returning no results when using the SXA token search in the Item Query for the page listing.