Better content targeting with Mavention Negated Audiences


One of the frequent challenges when working with Audiences is the inability to provide alternative content to users outside the Audiences to which the content is targeted. Find out how to prevent pages from getting blank with Mavention Negated Audiences.

SharePoint 2010 Audiences 101

The Audiences capability provided with SharePoint 2010 allows you to target content to specific groups of users. By leveraging Audiences you can not only unclutter the user interface but also make the solution more useful to the users by showing them relevant content.

Targeting content using Audiences in SharePoint 2010 is easy. Assuming you have configured Audiences in the User Profile Service Application, all you need to do is to navigate to a site, choose the Web Part that you want to display to specific audiences and in its properties select the desired Audiences.

The ‘Managers’ Audience selected in Web Part’s properties

After you apply the changes and you navigate to that page as a user who is a member of the selected Audience, you should see the Web Part as intended.

The ‘Management Announcement’ Web Part displayed on the page

If you however navigate to the same page as a user who isn’t a part of the selected Audience, you won’t see the Web Part.

A blank SharePoint 2010 Publishing Page

Although this works as intended, in many scenarios an empty spot or even a blank page is not good enough. In fact often content managers would like to be able to present alternative content to all users who are not a member of specific Audiences.

Targeting content to everyone but the Audience

One approach that you might consider for presenting alternative content to users who are not a part of specific Audiences is to create another Audience which contains all those users and target content to that Audience. This process can be challenging depending on the Audience rules: while it might be easy to create 18+ and 18- Audiences, you cannot really create an Audience with all users who don’t belong to a certain SharePoint group. Additionally this approach increases the solution maintenance effort as for every user group you have to maintain two Audiences instead of one.

Another approach worth considering is content targeting by negating the Audiences. Although it’s not available out of the box, it is a powerful approach that leverages the extensibility capabilities of the SharePoint 2010 platform. By extending the existing content targeting functionality, all you need to do is to add an option that allows you to negate the selection.

Targeting content using Mavention Negated Audiences

Mavention Negated Audiences is a SharePoint 2010 solution that extends the standard content targeting capabilities with negating audiences making it very easy to display alternative content to users who are not a member of specific Audiences.

Before you start targeting content using Mavention Negated Audiences, there is some configuration that needs to be done. Another thing that you should keep in mind is, that Mavention Negated Audiences extends the standard Audiences capability of SharePoint 2010. If you would like to stop using it at some point you would need to reconfigure all Web Parts where you used Negated Audiences (you checked the Negate Audiences checkbox). Considering there is not alternative functionality available out of the box you would very likely remove those Web Parts anyway.

Prerequisites

In order to use Mavention Negated Audiences you first need to install the Solution Package and deploy it in your Farm. Next, you have to select a Web Application where you want to use Mavention Negated Audiences, and enable the Mavention Negated Audiences Web Application Feature.

The ‘Mavention Negated Audiences’ Web Application Feature displayed in the list of Web Application Features

With that you can start targeting content to your users.

Working with Mavention Negated Audiences

Imagine you had a page where you would like to display one message to all managers and another to all other users. For this purpose you created the Managers Audience in the User Profile Service Application.

The first thing that we need to do is to add the message to managers to page and target it to the Managers Audience – just as we would do using the standard SharePoint 2010 Audiences functionality.

The ‘Managers Announcement’ Web Part targeted to the Managers Audience

Next, let’s add another Web Part that will contain the alternative message that should be displayed to all users who are not managers. In the Audiences field choose once again the Managers Audience, but this time check the Negate Audiences checkbox as well.

The ‘Non-Managers Announcement’ Web Part targeted to Managers with Negated Audience enabled

This will cause the Web Part to be displayed to all users who are not a member of the Managers Audience. Confirm your changes by clicking the OK button.

To test if everything is working correctly I have created two users: Joris (manager) and Waldek (employee). When I navigate to the announcement page as Joris, I will see the management announcement – as expected using the standard functionality.

The management announcement displayed to a user who is member of the Managers Audience

If I however navigate to the same page as Waldek I will see the alternative announcement!

The alternative announcement displayed to a user who is not a member of the Managers Audience

As you can see providing alternative content to users outside specific Audiences using Mavention Negated Audiences is very easy and adds minimal maintenance effort.

Summary

Using the Audiences capability of SharePoint 2010 you can target content to specific groups of users providing them with relevant content. One of the common limitation of the standard Audiences mechanism is the inability of providing alternative content to users who are not a member of the specific Audiences. With the Mavention Negated Audiences solution you can target content to both specific Audiences as well as all other users providing a complete experience to all your users.

Download: Mavention Negated Audiences (WSP, 6KB)

Others found also helpful: