Add the dialog rating widget to the portal content
In a default portal installation the dialog rating widget is available for rating pages and portlets. You can make the dialog rating widget available for own content.
To make the rating widget available for own content items use the following code:
By programming code:var widget = new com.ibm.widgets.AddRating({ resourceID: myResourceID, resourceTitle: myResourceTitle });
By declaration:<div dojoType="com.ibm.widgets.AddRating" resourceID="myResourceID" resourceTitle="myResourceTitle"></div>To add the rating widget declaratively, you can place it wherever you want within html code.
The parameter values have the following meaning:
myIDUse this parameter to specify an identifier that identifies the resource that you want to make available for rating by users. This needs to be unique.
myResourceTitleUse this parameter to describe the underlying resource that the user wants to rate. The resource title is shown in the title header bar of the dialog rating widget.
For more parameters refer to the parameter reference for the dialog rating widget.
Parent
The dialog rating widget