In this video you will learn how to use content search
webpart to rollup team sites within the site collection.
department in the company are using their own team site for collaboration and
individual users also requesting for the creation of sites based on the
demand. To maintain the track of all
team sites created, site collection administrator wanted to know all the list
of team sites that has been created within the site collection.
Steps - content search webpart rollup team sites:
Open SharePoint site collection. Click
on Edit from home page, click insert, click on webpart and select content
rollup and select Content search webpart from the lists and click on add.
Content search webpart by default
displays last modified items from search results.
Edit webpart to see the properties
of the content search webpart.
From the properties click on
From the Basics tab, click on
switch to advanced mode.
You need to modify the Query text
to display the team sites within the site collection.
To do that remove “(IsDocument:"True"
OR contentclass:"STS_ListItem")” keep the path because we need to
filter the values for training site collection.
From the select query choose “Team
sites (Tenant)”, and click on test, now you can see that you will get all the
team sites created within the tenant, but we need only team sites within this
Before we implement, let us
understand how Team sites (Tenant) results source has been build. Results
sources replacement of search scopes in SharePoint 2010.
Click on result source and open in
new window, this will open the Manage results sources page.
From the list click on Team sites
result source. Check for Query transform section on how the query has been
built for this. This shows “Webtemplate:STS”. This means, Team sites (Tenant)
resource source uses webtemplate managed property to filter the team sites
using webtemplatename, in this case it is “STS” for team sites. Now close this
window and go back to Build your query tab and search for property from
Click on Show all managed
properties to display all managed properties and look for webtemplate, select
equals and manual value enter STS in the textbox and click on “Add property
Now you can see that query text
added with “Webtemplate:STS”.
Change the select a query to local
SharePoint results and click on “Test Query” and display all the team sites in
this site collection including root one.
You can change the number of items
that being displayed, in this case I am changing to 10.
Display templates helps you to
format the results which are coming from search results.
Control templates controls the
overall display of the search results.
Item templates controls display of
individual items in search results.
Change the item template to “Two
You can change the property
mapping setting to other managed properties, in this case we will just keep it
as it is.
have you worked on content Search webpart?
Did you get a chance to work with content search webpart? If so how did you use it in your scenario or project you have worked on. You can provide the details in the comments section below.
In this video you have learned how to roll up team sites within the site collection using content search webpart. We will be providing lot of other scenarios where we can use this webpart in the coming videos. If you are using content search web part, let me know here your scenario and how are you implementing it.
Devendra Velegandla is a four-time recipient of Microsoft's Most Valuable Professional (MVP) award (2014-2017) for Office Servers and Services MVP and SharePoint Server. He received the MCC award for his contributions in Microsoft MSDN/TechNet forums. He loves sharing articles, videos, and tutorial on SharePoint and Office 365.
If you found this post helpful, please share it with your friends!!