Wednesday, November 28, 2007

Simple but useful - personalization/audiences

Personalization has been with SharePoint for a while... from our custom developed code in SPS2001, constantly improved features in SPS2003 & MOSS2007.

At my work I constantly bump into situations where these features need to be presented to my fellow IT colleagues and/or to end-users.


Here is a nice summary of technical options from Microsoft's MOSS 2007 site:
_______________________________________________________
Link: http://office.microsoft.com/en-us/sharepointserver/HA101690531033.aspx?pid=CH101785971033

Target content to specific audiences

List or library (library: A location on a SharePoint site where a collection of files is managed. The library can display information, including user-defined properties, about each file.) items in Microsoft Office SharePoint Server 2007 can be targeted to appear only to people who are members of a particular group or audience. An audience can be identified by using SharePoint groups (SharePoint group: A group of users that can be created on a SharePoint site to manage permissions to the site and to provide an e-mail distribution list for site users. A group can be used by many sites in one site collection.), distribution lists, or security groups or by using a rules-based system to create a global audience.

In this article


Overview

By using target audiences, you can display content such as list or library items, navigation links, and entire Web Parts (Web Part: A modular unit of information that consists of a title bar, a frame, and content. Web Parts are the basic building blocks of a Web Part Page.) to specific groups of people. This is useful when you want to present information that is relevant only to a particular group of people. For example, you can add a Web Part to the legal department's portal site that contains a list of legal contracts that is visible only to that department.

Any item in a SharePoint list or library can be targeted to specific audiences. To do this, you use the Content Query Web Part. Any other type of Web Part and its contents also can be targeted to audiences.

In addition, you can target site navigation links to audiences. Targeting the links simplifies the users' experience, because they see only the navigation links that are relevant to them.

    To identify a target audience, you can use one or more of the following:

  • SharePoint groups
  • Distribution lists
  • Security groups
  • Global audiences
  • Global audiences are rules-based audiences that are maintained by SharePoint administrators.

Anyone with at least Contributor permission (permission: Authorization to perform specific actions such as viewing pages, opening items, and creating subsites.) can specify a target audience, as long as the name of the audience is known. You can search for an audience by its name, alias, or description by clicking Browse nonein the Target Audiences list.

Top of Page Top of Page

Target list or library items to an audience

The following procedure shows you an example of how to target all of the items from a specific list where the list type is a document library. The Content Query Web Part also allows you to show all of the items from a site and its subsites or to show items from all sites in a site collection. You can then build a query to include the audience targeting that you set on the items in the sites or site collection. There are many ways to build queries by using the Content Query Web Part. Find links to more information about other settings in the Content Query Web Part in the See Also section.

Targeting items from a list or library to a specific audience requires three steps:

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.

  1. Click the list or library that contains the item you want to target.
  2. On the list toolbar, click Settings, and then click List Settings or Document Library Settings.
  3. Under General Settings, click Audience targeting settings.
  4. 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.

  1. Click the arrow next to the name of an item in the list or library, and then click Edit Properties.
  2. In the Target Audiences list, add one or more audiences.
  3. 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.

  1. On the page where you want to display the item, on the Site Actions menu menu, click Edit Page.
  2. Click Add a Web Part, and then under Default, click Content Query Web Part.
  3. Click Add.
  4. 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.
  5. 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.

  6. 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.

  7. 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.

When the page is rendered, the content in the Web Part appears only to current users who are members of the audiences you specified.

Note As with all Web Parts, the Content Query Web Part has a Target Audiences list in the Advanced section of the tool pane. This setting determines whether the Web Part itself is visible to the current user. If not, none of the other settings apply.

Top of Page Top of Page

Target a navigation link to an audience

A navigation link on a server running Microsoft Office SharePoint Server 2007 can be targeted so that it appears only to people who are members of a particular group or audience. You need to have at least Design permission in order to modify the site navigation settings.

  1. On the Web page that contains the site navigation, on the Site Actions menumenu, click Site Settings and then click Modify Navigation.
  2. On the Site Navigation Settings page, click none
  3. In the Navigation Link dialog box, type the title and URL of the link, and then add one or more audience names to the Audiences list.

When the page is rendered, the navigation link appears only to the people who are members of the audiences you specified.

Top of Page Top of Page

Target a Web Part to an audience

Microsoft Office SharePoint Server 2007 Web Parts can be targeted to appear only to people who are members of a particular group or audience.

An audience can be identified by using a SharePoint group, a distribution list, a security group, or a global audience.

  1. On the Web page that contains the Web Part, on the Site Action menu menu, click Edit Page.
  2. On the Web Part, click the Web Part menuWeb Part Edit Menu , and then click Modify Shared Web Part.
  3. Under Advanced, add one or more audience names to the Target Audiences list.

When the page is rendered, the Web Part appears only to the people who are members of the audiences you specified.

Top of Page Top of Page