I was chatting with Sue Hanley this weekend and she pointed out a new feature I hadn’t noticed before on the modern page Highlighted Content web part in SharePoint Online. The option will allow you to point to a completely different site and pull search results from there. Thanks for pointing this out Sue… this is awesome!
I can think of many use-cases for this functionality and I’ll cover one of them in this post.
Scenario: I have a standard department site layout used when creating every department site across my tenant. This layout could be manually configured or provisioned through automation. On the homepage of every site, I want to display 2 standard pieces of information on the top right corner:
- Site Usage Guidelines
- Site Owner Agreement
These will explain the organization’s guidelines for the site and is governance in action. Examples of the types of guidance in these are: what to store in a department site, the handling controls for the information, site owner responsibilities, etc. We want these guidelines to be consistent across all department sites in our tenant.
Like any good content management professional would tell you, we will NOT be storing a copy of the guidance on each site, but rather linking to a central location where it it stored. In this way, if the guidance changes, we only have to change it in the central location.
Following are the steps to do this using modern pages.
Decide where to store them
For this example, I created a modern SharePoint Communication site called Governance Center to store all corporate-wide governance and training material. I’ll create the Site Usage Guidelines and Site Owner Agreement content as modern pages on the site. Although I could have created them as documents, I’ve chosen modern pages because they can be displayed in a visually appealing way.
Design the Information Architecture
We need a way to identify the Site Usage Guidelines and Site Owner Agreement on the Governance Center to automatically display on the Department home page. We could do this several different ways:
- On the Governance Center, create a custom Site Page content type and create each page we want shown on the department home page based on the custom content type. Then, on the Department site, filter the search web part on the content type managed property.
- On the Governance Center, create a site column and add it to the Site Pages library on the default Site Page content type. Then, on the Department site, filter the search web part on the site column managed property
- Combination of the above 2 options
We will go with the third option above. On the Governance Center I’ll create a custom Site Page content type called Site Guidance Page. I’ll add a Yes/No site column to it called ShowOnDepartmentHome.
This provides the flexibility to have numerous Site Guidance Pages displayed together on the Governance Communication site if I wanted to and individually identify any Site Guidance Page to also be displayed on a Department site’s home page through a search web part, in this case the Site Usage Guidelines and Site Owner Agreement.
Here is the content type definition for Site Guidance Page.
Add this custom content type to the Site Pages library on the Governance Center communication site.
Create Site Guidance and Site Owner Pages
Create 2 new Site Guidance Pages, one for each of the Site Usage Guideline and the Site Owner Agreement (below).
Add the relevant guidance and content on each page. We will use the new Page Detail feature to set the page property, ShowOnDepartmentHome, to Yes for each page.
For demonstration, I created a third page of the same content type, but set the ShowOnDepartmentHome to No. This page should not appear on the Department site’s homepage. Below is a view of the pages added to the Site Pages library on the Governance Center site.
Wait for them to be indexed by the search engine and for the crawled and managed properties to be generated.
Create Department Site and Home Page
This can be done manually (what I’ve done here), or in an automated way. I created a Modern Team Site for a department. I’ve also added a Highlighted Content web part to the home page of the site to show the above 2 pages in a visually appealing, consistent way. This would be done for every department site across our tenant.
Here are the settings for the Highlighted Content web part:
… and here is the home page of the Department site showing the filtered site pages from the Governance site. On the right-hand side, the Highlighted Content web part is circled:
This is awesome! One place to update the content and many locations dynamically displaying it across the tenant!
I hope this post has got your creative juices flowing for ways you can build out your own environments by leveraging search – it really is a smart way of surfacing content across your tenant. This capability has been available in Classic SharePoint search for a long time – it’s great to see it starting to come to the Modern world.
Thanks for reading.
Credit: Photo by rawpixel.com from Pexels