0

In Page I used search result to display items from Template, and this template contains "drop link field" I need to filter these results like that enter image description here I need to use "Current Item ID" in search scope to filter results, IS There a way to get Context Item in scope???

  • Can you add an example of what you're trying to do? What have you tried that doesn't work? – Dan Sinclair May 20 '19 at 11:25
2

It is not possible out of the box. But you can add such functionality (extend the SXA) pretty easily by adding your own "search token" (adding a processor to one of SXA pipelines).

SXA can enrich search queries with Search Query Tokens. Take a look at exiting processors in resolveSearchQueryTokens pipeline. What you want to achieve is almost the copy of the existing token - CurrentTemplate (it is located here Sitecore.XA.Foundation.Search.Pipelines.ResolveSearchQueryTokens).

There are some blog posts which can help you with, for example, this one: https://ggullentops.blogspot.com/2019/01/extending-sxa-search-query-tokens.html.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.