Content query webpart does not give the same flexibility as search results page to allow user to filter and sort by property.
SharePoint Online provides out of the box display template which can be used in results page. However if custom property needs to be displayed or a custom display format is needed , then a new search result page can be created.
Assuming news items need to be displayed in the following format with filters Country and Subject.
- Map Managed Metadata fields to managed properties Country and Subject are managed metadata fields. Two crawled properties are created per managed metadata fields. For example field country has two crawled properties ows_taxId_Country and ows_Country. The ows_FieldName format stores the friendly label and is not mapped by default. The latter can be mapped to the out of the box refinable string mapped properties.
2. Create Result Source for the news
3.Create a new result display template “Item_NewsArticle.html” by following the guide
The Item_NewsArticle.js gets generated automatically.
- On the news article results page, ensure the search results web part uses the template “New Article Item” and the query use the ” All News Article” result source created in previous steps.