Thursday, February 27, 2014

Ratings Control SharePoint 2013 On-Prem

Adding ratings control in SharePoint 2013 on-premise requires going via Design Manager.

Here is the process:

  • Publishing Feature should be turned active.
  • Pages library should be provisioned
  • Go to Library Settings as in the image and make changes.
  • Once Ratings have been turned on, open your custom master page/page layout via Design manager to add this code.
  • Add this code inside the Head section
<!--CS: Start Create Snippets From Custom ASP.NET Markup Snippet-->
<!--SPM:<%@ Register TagPrefix="SharePointPortalControls" Namespace="Microsoft.SharePoint.Portal.WebControls"  Assembly="Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>-->
  • Add this code where you want to display the average ratings
 <--<div class="article-content" align="left" style="left:0px; width:100px">
            <!--CS: Start Create Snippets From Custom ASP.NET Markup Snippet-->
<!--SPM:<SharePointPortalControls:AverageRatingFieldControl 
   ID="PageRatingControl" 
   FieldName="AverageRating" 
   runat="server"/>-->
<!--CE: End Create Snippets From Custom ASP.NET Markup Snippet-->
           </div>-->

No comments:

Post a Comment