When you add a modern page to a site, you add and customize web parts, which are the building blocks of your page.
This article describes the Highlighted content web part.
Use this web part to dynamically display content (documents, pages, news, videos, images, etc.) from a document library, a site, a set of sites, a site collection, or all sites. By default, this web part shows your most recent documents. If you don't have any documents, files, or pages on your site, you'll first have to create or upload them.
How does it work?
-
Add the Highlighted content web part: Start with adding the web part to your page.
-
Choose content: Choose the source location (such as a site or document library) and type of content to show (such as documents, pages, news, videos, images, etc.).
-
Filter, sort, and query: Set filters to narrow down the content to show (such as documents modified by the current user) and a sort order. If you're familiar with query languages, you can also create a custom query.
-
Select a layout: Choose between Cards, List, Carousel, or Filmstrip layouts.
Note: A maximum of 200 items can be returned.
Add the Highlighted content web part to a page
-
If you're not in edit mode already, click Edit at the top right of the page.
-
Hover your mouse above or below an existing web part or under the title region, click , and then select the Highlighted content web part.
Once the web part is on the page, you can change the title by typing over the default title Most recent documents.
-
Click the Edit button and select your options.
Choose the content
Once you have added the web part and you see the web part property pane, do the following:
-
In the Source dropdown, select where you want to show content from: This site, A document library on this site, This site collection, The page library on this site, Select sites, or All sites. (This site is selected by default.) If your site is connected to a hub site, you will also have an option to select All sites in the hub.
When you select Select sites, you can search for the site you want to add, or select one or more sites from Frequent sites, or Recent sites. You can select up to 30 sites.
Notes:
-
The Select sites option is not available in SharePoint Server, U.S. Government GCC High and DoD, and Office 365 operated by 21Vianet.
-
For SharePoint Server 2019, your choices are This site, A document library on this site, This site collection, and All sites.
-
If you plan on using multiple filters, see how they work together in the Using multiple filters section below.
-
-
In the Type dropdown, select the type of content you want to show. The type of content available will depend on your source.
If you want to show additional content types, click + Add content type.
Filter and sort
Once you have selected your content source and type, you can set filter and sort options to narrow down and organize the content.
-
In the Filter dropdown, select what you want to filter by, and then enter the specific details for the filter. The filters available will depend on the content type.
-
Title includes the words Enter the search words for the titles you want to find
-
Content includes the words Enter the search words for the content you want to find
-
Recently added Enter the time period since an item was added (such as Today, Yesterday, Earlier this week, and so on).
-
Recently changed Enter the time period since an item was changed (such as Today, Yesterday, Earlier this week, and so on).
-
Created by Enter a user name if you choose Selected user. Otherwise, use Current user, which will filter for items created by whoever is viewing the page at the time.
-
Modified by Enter a user name if you choose Selected user. Otherwise, use Current user, which will filter for items created by whoever is viewing the page at the time.
-
Managed property This option is available for all Source options except Document library. Managed properties can be built-in or custom, but must be searchable. Enter a word to narrow down the list of searchable properties, select a property from the dropdown, and enter your criteria.
For general information on managed properties, see Manage the search schema in SharePoint. For a list of available properties, see Overview of crawled and managed properties.
-
-
In the Sort by dropdown, choose your option. The default is Most recent.
-
Most recent
-
Most viewed: Shows the most viewed items across your source selection (for example, you may have selected multiple sites as your source).
-
Trending: Shows items trending around a user. The items shown are based on activity of the user's closest network of people and include files stored in OneDrive for Business and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. For more information, see Office Graph Insights.
-
Managed property ascending
-
Managed property descending
-
Using multiple filters
Using multiple filters is a great way to narrow down your content results. When you use multiple filters, your results will be based on OR operations for filters of the same type, and AND operations for filters of different types.
-
Example If you select two filters: Title includes the word Status, and Title includes the word Project, your result will be all files that have Titles containing the word Status or Project.
On the other hand, if you select filters of different types, your results will be based on AND operations.
-
Example If you select two filters: Title includes the word Status, and Created by megan, then you will get only those files that have Status in the Title and that are also created by megan.
When you select multiple filters of different types, your results will be based on grouped OR operations for all filters of the same type, and AND operations for filters of different types, as shown here:
Custom query
If you are familiar with using query languages, you can use Keyword Query Language (KQL) or Collaborative Application Markup Language (CAML) query strings to further customize your search.
-
Select Custom query.
-
Select the source of the items you want to display. The source will determine the query language to use and the UI options you see:
This site, This site collection, and Select sites use KQL query strings. For more information on KQL, see the keyword-query-language-kql-syntax-reference
Document library and Pages library on this site uses CAML query strings. For more information on CAML, see the query schema for CAML.
Notes:
-
When you select a site source, a site ID and/or web ID is display for you and automatically appended to your query string.
-
-
-
When you're done entering your query string, click Apply.
Custom query to show Microsoft Teams meeting recordings
If your organization has enabled saving Teams meeting recordings to OneDrive and SharePoint then you can use a custom query in the highlighted content web part to show only meeting recordings.
-
Follow the steps above for a Custom query.
-
In the Query text enter: ProgID:Media AND ProgID:Meeting
-
When you're done entering your query string, click Apply.
Audience targeting
By using audience targeting, you can highlight content to specific groups of people. This is useful when you want to present information that is relevant to a particular group of people. For example, you can target files dealing with a specific project to team members and stakeholders of the project.
To use audience targeting, you must first enable audience targeting for the library that contains the items for targeting, select your audience, and then enable audience targeting in the Highlighted content web part.
Note: If you've selected an audience group that you recently created or changed, it may take some time to see targeting applied for that group.
Enable audience targeting in a library
-
From your site's home page, select Site contents.
-
Hover over Documents, select the ellipses (...) and then select Settings.
-
Select Audience targeting settings from the settings list.
-
Select the checkbox to Enable audience targeting then select OK.
-
Return to the library by selecting Documents (or the name of the library you are using) from the menu on the left side of the page. If you don't see your library on the left side of the page, go to Settings on the upper right, then select Site contents where you should be able to find your library.
-
For each file you wish to target to specific audiences, select the ellipses (...).
-
In the properties pane, select Edit all.
-
Enter up to 50 audiences in the Audience section. Then click Save.
Audiences will then appear in the Documents library.
Enable audience targeting in the web part
-
If your page is not already in edit mode, select Edit at the top right of the page, and select the Highlighted content web part.
-
Select the Edit web part button.
-
In the Filter section, turn on Enable audience targeting.
Choose the layout
Choose Cards, List, Filmstrip, or Carousel, then enter the number of items you'd like to show and whether to show the web part when no items are found.
Note: If you're familiar with earlier versions of SharePoint, Highlighted content is the newer, simplified version of the Content Search web part.
No comments:
Post a Comment