How to render search results in Sitecore sxa?

How to render search results in Sitecore sxa?

After the initial load of a page, the search results rendering will make an AJAX call to the search service API by passing the search scope and query. Once it gets the results from the server, it will then render them on the page with the pre-defined template.

Which is part of the sxa search component?

The search results rendering is one of the SXA search components. It utilises the global scope for sharing the settings between each of the search components i.e. search box, search filter, load more button etc.

Is there a sxa search template for JavaScript?

While SXA search will often meet the client search requirements, there are some limitations with the out-of-the-box implementation, i.e. the rendering template is hard-coded in the JavaScript, which can present some challenges when the front-end developers want to work with the templates.

Which is the default action result in sxa?

Keep in mind that the controller must inherit from Sitecore.XA.Foundation.Mvc.Controllers.StandardController. The Standard controller will handle the routing with default action result “Index”, so there’s no need to add our own, although we can override “Index” if we need to.

Where to find available renderings in sxa toolbox?

To make the rendering appear in the toolbox, we need to add it to Available Renderings. The Available Renderings folder is found under the Presentation folder of your SXA site. First add an Available Renderings item under the Available Renderings folder. In this case, I’ve added one called Cars.

What do you need to know about sxa search?

SXA is bundled with quite a number of search components. Let us see what is in use. Location Finder – essentially a search box with label and button. Search Results – just like it sounds. Filter (Radius) – used to reduce the search results by geospatial comparison. Map – a map using the Google Maps JavaScript API.

How to customize the marker icon in sxa?

The POI Type item provides a way to customize the marker icon. For this demo I created a new POI type under Presentation -> POI Types, which allowed me to specify the awesome SPE custom marker icon. The POI item as mentioned before contains the Latitude and Longitude necessary for the spatial search to function.

When do you need to list pages in Sitecore?

There are normally a few times when implementing a Sitecore site where you need to list pages, and its rare that its always as simple as just child pages, or items of the same template. We normally will want to manipulate the data in some way.