Is there a way to read the search results count in a Scriban template in a rendering variant of SearchResult in SXA?
I have a requirement that if the search results count is less than 6 the result should be rendered on the page - otherwise we should be displaying a link so that the user can navigate to a page where we will display all the results.
I decided to achieve it thru Scriban by determining the result count and decide whether to render the search result or link.
SearchResult
scriban is the repeating element in the search results, its not rendering the full result set, so I would be surprised if it passed in the total count of the search results to the rendering.