ratingTemplate
Displays a rating for an item.
Overview
Use the ratingTemplate element to display a rating for an item. The following figure shows the basic layout for a ratingTemplate page. The theme for the rating template defaults to the system preference.
[Image]
Main Elements
The following listing shows the main elements of the ratingTemplate element in TVML format.
<document>
<ratingTemplate>
<title>…</title>
<ratingBadge></ratingBadge>
</ratingTemplate>
</document>Element Descriptions
- ratingBadge
The rating for the item.
- title
The title for the rated item.
Example
The following listing shows the TVML for a ratingTemplate example. The example displays a title and a set of rating badge images, such as stars. The filled rating badge images indicate the current rating for that title. The value attribute indicates that the example title has an 80 percent favorable rating, or 4 of 5 stars.
<document>
<ratingTemplate>
<title>WWDC Roadtrip</title>
<ratingBadge value="0.8"></ratingBadge>
</ratingTemplate>
</document>The following figure shows the output for the above example:
[Image]