Slide Show using Content Search Web Part
Content Search Web Part is a new web part introduced in SharePoint 2013.
Please note that Content Query Web Part is different and was pre-existing in SharePoint 2010 too.
What are the advantages?
The following are the advantages:
- Search Query Association
- Display Templates (HTML, JavaScript)
- Scope can be Site Collection, Site or Library level
- Styling Options
Please note that Search Crawl must be done to display fresh results using this web part.
Side Show Example
Step 1: Create Picture Library
Create a Document Library of type picture library, change the name to Slides and add some pictures into it.
Step 2: Create Page
Add a new page and choose the Edit Page option.
Enter the page name as SlidePage.
Step 3: Insert Content Search Web Part
Choose the Insert tab and Web Part ribbon item; choose the
Content Rollup category and then the Content Search web part.
Add the web part to the page.
Step 4: Configure Web Part
Choose the Edit Web Part option and click the
Change query button.
In the dialog box choose the following options.
You are specifying:
- Pictures to be displayed
- Scoping to a URL
- Specifying our picture library URL
From the right pane you can verify the results. (It takes 15 minutes for the search crawl to refresh with new contents.)
Save the dialog.
From the web part properties make the following changes in the Display Templates section.
Click OK to save the web part. Save the changes to the page.
Step 5: Test the web part
Refresh the slide page and you should see the following display.
The slides will start changing after a few seconds.
There can be a 15 minute delay for the Search Crawl to update the new picture documents. Please ensure you refresh the page after 15 minutes of upload.
Summary
In this article we have explored how to use a Content Search Web Part for doing a slide show.
References
Content Search Web Part in SharePoint 2013
Summary
This article was an overview of the Content Search Web Part. In future articles we will see how to use it.