The Content Query Web Part
A SharePoint Online tutorial by Peter Kalmström
The Content Query web part is only available when the SharePoint
Server Publishing Infrastructure feature has been activated
for the site collection. Then you can find it in the Content
Rollup web part category.
The Content Query is similar to the Content Search web part
that has been used in several earlier demonstrations, but
there is an important difference in how the search is performed:
The Content Search can search the index of the entire tenancy,
while the Content Query only can search the site collection
(default) or specified sites in the site collection.
There is a certain delay before the index is updated, so
you will not see your changes right away when you let the
Content Search search the whole index. With the Content
Query web part any changes are shown more quickly, and therefore
the Content Query is suitable for content that is often
changed, like tasks. The Content Query is a bit easier to
configure, as you can find all options in the web part properties.
In the demo below Peter Kalmström, CEO and Systems Designer
of kalmstrom.com Business Solutions, shows how to use the
Content Query web part to collect tasks from sites within
the same site collection and show them on a page.
Add a Content Query web part that shows all tasks
- Open the page where you want to add the web part
in edit mode.
- Under the INSERT tab, click on Web Part and select
the Content Query web part in the Content Rollup category.
- Edit the web part and open the Query accordion.
- Add site URLs if you want to restrict the search
to certain sites and not include the whole site collection.
- Select to show items from the Tasks list type.
- Expand the Properties accordion and remove the text
in the URL textbox under Fields to display. Under Properties
you can also group and sort the displayed items, set
the number of columns and make other settings.
- Expand the Appearance accordion and enter a suitable
title for the web part.
- Make any other web part settings you prefer, apply
and save the page.
|