1. Activate the rating feature for the page library from Settings -- Rating Settings:
2. Now using SharePoint Designer Open the Layout Pages folder and open the Body Only Page Layout.
3. Add the following Register directives at the top of this layout page:
<%@ Register Tagprefix="SharePointPortalControls" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>4.Add the AverageRatingFieldControl to the PlaceHolderMain content control:
<SharePointPortalControls:AverageRatingFieldControl id="PageRatingControl" FieldName="Rating (0-5)" runat="server"/>Need to make sure that the FieldName must match the column name in the list.
(The code may not show properly in the Firefox)
5. It may be required to do a IIS reset.
6. Once this is done if you create a new page in SharePoint using this layout you will see that rating control will appear on the page and user can easily do the rating:
8 comments:
How can we add this control in the Blogs site of the SharePoint 2010. I am working to add near the title of the blog on the Default.aspx page.
Reply will be helpful.
Since blogs does not have a page layout the above will not work..For this you need to add the rating column in the Post Content Type and then in the Post.aspx file add the column as well. I will put a detailed post on this
Thanks Manish for response. Well I added both controls Rating and No of Rating in the Post Content type. Now I ad also adding the controlto post.aspx page of the Posts library, but I cannot see the columns in the add lists of column in SharePoint Designer 2010. Is I am missing anything. Response will be helpful.
Well i got it. I had added al the things.
1. Added in Post Content Type of the Blogs Site.
2. Added the above register tag and control tag in the Post.aspx page of Posts list in Blog site.
Its working Wow.
Thanks for your help.
Hi,
Well I have added the control. Is there any way to add using XSL(blogs.xsl)?
Hi, i'm stuck exactly at the same position where BSukhwal is... trying to add the rating to a blog via XSL (because blog's default is xsl - btw. can anyone explain why this is??). is there already a solution somewhere??
Well I am again stuck at same issue. Need some help. In the blog view I have to change the Author name with custom column 'Name'. Any Idea ?
Thanks
Bharat
Hi,
I have created custom list using Schema files in MOSS 2007. I have upgraded my package to SharePoint 2010 and trying to enable rating on those lists. Both rating columns are added but control is not displayed in the list. I mean no stars are displayed there in the list items.
Any clue on this behavior.
Post a Comment