Skip to main content
Bumped by Community user
edited tags
Source Link
Gatogordo
  • 20.3k
  • 2
  • 39
  • 100

Is there a way to read the search resultresults count in scriban undera 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 in sxa,should be rendered on the page - otherwise we should be displaying a link so that based on searchthe 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 I can show different content inand decide whether to render the search result? or link.

Is there a way to read search result count in scriban under rendering variant of search result in sxa, so that based on search result count I can show different content in the search result?

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.

Source Link

Sitecore SXA search result count in scriban

Is there a way to read search result count in scriban under rendering variant of search result in sxa, so that based on search result count I can show different content in the search result?