What is Content Search Webpart?
- This Webpart is introduced in SP 2013. It is powerful.
- Display content on your SharePoint pages by configuring simple and advanced queries in a Content Search Web Part.
- One of the best feature in SharePoint Online will return the data very quickly compared to content query Webpart.
- Content Search allows you to query and display the information from any site collection and beyond.
Follow the listed steps given below to add CSWP in your SP page.
Open your SharePoint site.
Now, go to the page, where you need to add CSWP.
Edit the page by clicking the page tab on the top ribbon bar.
On the click on the Add a Web part, after you clicked, you can see many categories.
Select Content Rollup section. We can see the Content Search Webpart on the right side.
Click Add button to add CSWP on your page.
Finally, content search Webpart will be added on your page and it will show the recent items from your site.
Now, edit the page and edit the Web part properties to configure the search Query.
On the Webpart properties pane, click Change Query button under search criteria. After you clicked, you will get the pop up.
In the pop up screen, click Switch to Advanced Mode to configure the query, as shown below.
Now, select a Query result source, Keyword Filter and Property Filter.
- Result Source – Local SharePoint results.
- Keyword Filters – Only returns the lists and the libraries.
- Property Filter – ListID , Manual Value.
ListID is list GUID (take list GUID from the list settings URL).
After you provided all the details, click Add Property Filter button and Test the Query. Click OK button.
When you click Test Query button, you will get the relevant results on the right side, as shown below.
Now, do the property mappings on the Web part properties Window and click OK button.
Finally Content Search Webpart will be added on your page with the particular list items.
In this article, we have explored how to get the list items, using content search Webpart in SharePoint Online. Happy searching.