Step 1: Enable audience targeting on the list or library
When you enable audience targeting on a list or library, you can target each item in the list or library to an audience.Note If the SharePoint list or library already is enabled for audience targeting, the Target Audiences column appears.
- Click the list or library that contains the item you want to target.
- On the list toolbar, click Settings, and then click List Settings or Document Library Settings.
- Under General Settings, click Audience targeting settings.
- Select the Enable audience targeting check box.
Step 2: Specify the target audience on the items
After you enable the list or library for audience targeting, you can set individual items in the list or library to be displayed to one or more audiences.- Click the arrow next to the name of an item in the list or library, and then click Edit Properties.
- In the Target Audiences list, add one or more audiences.
Note If content approval or workflow is enabled on the list or library, the item may need to go through the approval process.
Step 3: Display the item in a Web Part
To display the list or library item to a specific audience, you can use the Content Query Web Part. The Content Query Web Part allows you to build a query that can filter list and library items.This example shows you how to display all of the the items from a specific list to a target audience. The list type is document library.
Find links to more information about other settings in the Content Query Web Part in the See Also section.
- On the page where you want to display the item, on the
menu, click Edit Page.
- Click Add a Web Part, and then under Default, click Content Query Web Part.
- Click Add.
- Click Edit and then click Modify Shared Web Part to open the tool pane (tool pane: A task pane on a Web Part Page used to browse, search for, and import Web Parts from Web Part galleries, and to modify custom and common Web Part properties.) for the Web Part.
- In the tool pane, under Query, click Show items from the following list and then specify the location of the list.
Note In this example, we specify a particular list. You can broaden the scope to include items in lists from more than one site by clicking one of the other options.
- Under List Type, choose the type of list that the item is a member of. In this example, click Document Library. Only items in the list type that you choose are processed by the query.
Note This setting is required.
- Under Audience Targeting, do the following.
To | Do this |
---|---|
Display the list items to the target audience that you specified in Step 2: Specify the target audience on the items, when the current user is a member of the audience. | Select the Apply Audience Filtering check box. This is required for the query to work properly. |
Also display the items in the list that do not have a target audience specified. These items are displayed to everyone. | Select the Include items that are not targeted check box. This is optional. |
No comments:
Post a Comment