Overview:
This article explains how to configure the Data View Plus web part to aggregate content from a Hub Site and all its associated sites in SharePoint. By including the HubSiteId in the aggregation query, you can automatically include all associated sites in the scope without manually specifying each one.
Steps to Configure Aggregation Scope for Hub Sites:
- Find Your Hub Site’s ID (HubSiteId): Every Hub Site in SharePoint has a special ID called the HubSiteId. Here’s how to find it:
-
- Modify the Aggregation Query:
-
- Add this text to the query box:[your search term] AND (DepartmentId:{[hub id]} OR DepartmentId:[hub id])
-
- Replace
[your search term] with what you’re looking for (e.g., “document” or “event”). - Replace
[hub id] with the HubSiteId you copied earlier.
- Save your changes.
- Refresh the page and make sure you see content from the Hub Site and its connected sites.