Monday, July 6, 2015

SharePoint 2013: Personalize a page and configure Web Parts to create a personal view.

Scope
Site users can personalize a page and configure Web Parts to create a personal view.

Implementation:

Out of the box approach

Personalize this Page
- On pages the site contributors can add the Web Parts to create a personal view of the page. For example, a Web Part can be added to a page and viewable by only those users. When users personalize a page, others will continue to view the public version or the shared version, or their own personalized version. Once a page is personalized, we have an option to view either your personal version or the shared version.
 Personalize the page
  • Create web part page “My Page”
  • Check following permission level at Web Application level and user group level in order to enable personalize this page menu in the site for the user.
 Enable personalize this page menu
  • Restrict personal page from showing all web parts in the Add Web Part list by assigning appropriate permission to Web Part Gallery.

Following customization need to be carried out
  • Hide Ribbon on page edit.
  • Enable Personalize this Page option only to the custom "My Page". Hide this menu for all the other pages.
Custom approach
  • Create a List "PersonalizableWebParts" to have the list/library name that can be configured as personal web part. The list data should be configurable by the administrator in portal base UI.


  • Adding menu item "My Page" to the User/Welcome Menu in SharePoint


  • Create a Web Part page with following Web Part Zones and layout.


 Web Part Zones and layout
  • Create a custom Web Part that displays the items in PersonalizableWebParts list and provide a button to "Add to Web Part" in the Web Part Zone right.


  • Create a single Web Part in Right zone with four sections using table/div


  • Load four different user controls in four different sections based on user selection


  • Save the user selection of user controls and load next time automatically.


  • The page should have read permission to all users. Adding Web Part should be executed programmatically using elevated privileges.


  • Set default view for each Web Part.

Limitations/Risks

There are few limitations/risks using the out of the box SharePoint features to personalize pages.
  1. Using Target Audience for the Web Parts added in the “My Page”. If multiple users add Web Parts with audience set, then there will be multiple copy of the Web Part in the page which lead to performance issues. Also the order/alignment set by the users to display Web Part cannot be retained.
  2. Web Part Zone does not have personalization option like Web Parts.
  3. Personal Site – Personal Site gives users a central location to manage and store documents, content, links, and contacts. Content providers can use My Site as a method of customizing the information they present to users. However this feature is supported only in SharePoint Servers and not on Foundation versions.

No comments:

Post a Comment