Syntax
<dlog:Rating id={unique control ID} ObjectName={Name of object}
CurrentRating={int} MaxRating={int} ReadOnly={true/false}
StarCssClass={class name} WaitingStarCssClass={class name}
FilledStarCssClass={class name} EmptyStarCssClass={class name}
NavigateUrl={redirection url}
RatingAlign={Horizontal/Vertical} RatingDirection={LeftToRightTopToBottom/RightToLeftBottomToTop}
></dlog:Rating>
Usage
Supports the rating of objects using images, such as stars or thumbs up/down.
Attributes
id: (Required) A unique identifier for the control. Multiple rating controls may be used on a page, but each control control must have a unique ID.
ObjectName: (Optional) A Salesforce junction object name. If not defined, the object context defined in the editor is assumed to be the junction object name.
Junction object assumptions:
- Has Lookup fields to a Lead and/or Contact
- Has one Lookup relationship to any other object (other than Lead/Contact)
- Has one Number field for storing the rating
CurrentRating: (Optional) Initial rating value
MaxRating: (Optional) Maximum rating value
ReadOnly: (Optional) Whether or not the rating can be changed
StarCssClass: (Optional) CSS class for a visible star
WaitingStarCssClass: (Optional) CSS class for a star in waiting mode
FilledStarCssClass: (Optional) CSS class for star in filled mode
EmptyStarCssClass: (Optional) CSS class for a star in empty mode
NavigateUrl: (Optional) Redirects rating clicks for anonymous (non-authenticated) users. Used in conversion campaigns that only allow registered users to rate records.
RatingAlign: (Optional) Alignment of the stars (Vertical or Horizontal)
RatingDirection: (Optional) Orientation of the stars (LeftToRightTopToBottom or RightToLeftBottomToTop)
Notes:
When a rating item is selected, an object of type ObjectName is created which must contain 3 fields. If a junction object already exists, the existing record will be updated.
1) The object being rated
2) The person who is rating the object (Lead and/or Contact Lookup)
3) The rating value (Number)
For more information on creating junction objects for use in rating,
read this article.Example:
<style type="text/css">
.ratingStar {
font-size: 0pt;
width: 13px;
height: 12px;
margin: 0px;
padding: 0px;
cursor: pointer;
display: block;
background-repeat: no-repeat;
}
.filledRatingStar {
background-image: url(Images/icons/FilledStar.png);
}
.emptyRatingStar {
background-image: url(Images/icons/EmptyStar.png);
}
.savedRatingStar {
background-image: url(Images/icons/SavedStar.png);
}</style>
<dlog:Rating id="DocumentRating"
ObjectName="ContactDocumentRating" CurrentRating="0" MaxRating="5"
StarCssClass="ratingStar" WaitingStarCssClass="savedRatingStar"
FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar"
style="float: left;"></dlog:Rating>