Page Rating example using Page Objects
At the EPiServer Techforum in Oslo last week, I showed a quick and dirty page rating feature for CMS 6 using Page Objects and Dynamic Content. The source code for that can be found here .
The project consists of 3 class:
- The Rating object. This is the Page Object that holds the rating data for the page
- The RatingDC which provides the IDynamicContent implementation
- The RatingControl which is the Dynamic Content User Interface control.
To test it out, copy the Rating assembly dll to a CMS RC1 site’s bin folder. Create a Rating folder under the site root folder and then copy the RatingControl.ascx to that. Under that folder create a folder called Images. To that folder copy the star.png file.
You will then need to register the Dynamic Content in the site’s episerver.config file as shown below:
<dynamicContent> <controls> <add description="Displays a Rating facility" name="Rating" type="EPiServer.Samples.RatingDC, Rating" /> </controls> </dynamicContent>