Sunday, July 08, 2012

SharePoint 2010: Creating personal content streams

One of my customers asked me for a way to let there employees "subscribe" to content sources so that they would only see news and events that are interesting for them personally.

I explained the customer "audiences" that can be used for these purpose but unfortunately their Active Directory isn't that well populated.

The "content sources" consist of interest areas that needed to be centrally managed (Term Store); this way we can ensure that both the "subscribers" and the "publishers" are using the same content source.

First off I started creating the term-set to hold the "content sources" in the Term Store.
Company Taxonomy
Interest Areas

Next, I configured the user profile service configuration in SharePoint 2010;
- Central Administration : Manage Service Applications
- Either manage (highlight the row and click 'manage' on the top) or create a new User Profile Service Application and then manage it:

- Under people, there is a link "Manage User Properties", this is the location where we can add the new "ContentSource" property. Employees will be able to manage the selection of this "Content Source" them selves.
- On the top of the page there is a link to create a "New Property"
- We can give the property a name etc.
- The property type (depending on your solution) will either be a single (single value) or string (multi value)
- When selecting multi value, please be sure to use the Semicolon separator, this will ensure the filter webpart to be able to work with the multiple values.
- Next up, we'll be able to select the Term Set from the Term Store we created in step 1.

Creating the content holder.
The content holder can be a library or a list where we will add a column (either on the list or document library or content type) that references the same "Interest Areas" term-set we created in step 1.
This will allow the "publishers of content" to select the interest area for the content.

Filtering the content based on the current logged in users' profile selection.
To accomplish this we create 2 web-parts on a page.
The first web-part will be linked to the content holder created in Step3; obviously we can link using a specific view that filters maybe on publication date etc.; Creating multiple content filters.

Next, we'll add the "Current User Filter" Web-Part To the page.
This filter will apply an extra filter to this list, filtering the content based on the current user selected interest areas.
• Note: The configuration of the 'Current User Filter' Web-Part will only be shown when you edit the "List View" Web-Part; this is a bit confusing.

Configuring the "Current User Filter" Web-Part is easy:
After adding the Web-Part to the page hover over the little drop down arrow on the top right and follow the drop-down path down to filter it's data to the list-view Web-Part:

After a few seconds the configuration pops up:

• Note: this will only happen in Internet Explorer; I tried Chrome to do this, doesn't work out of the box.

In this configuration menu you can select the property from the user profile properties that we linked to the Term Store "Interest Areas" term-set.
Clicking finish will instantly filter down our "List View" Web Part.

To configure additional options:

Choose "Edit Web Part"
You can re-configure the field to be provided to the List View Web-Part:

That's it; the page now automatically filters down items from the list that the current user has "Subscribed to".
The current user obviously can change these values by going to his "My Site" and click on "Edit Profile":

There the user will be provided with a normal "Select From Term-Set" input box:

Great solution, giving the users control on what they see on SharePoint !