Question

Looking at the documentation for UGC in Tridion SP1 2011, is it possible to dynamically query for "popular" content - so return all pages or components ordered by rating or number of comments?

The UGC commands seem to deal with comments/rating on an individual page/component - but not querying for content based upon that data.

Is something available in CD Web Service when you install UGC?

Cheers

Was it helpful?

Solution

I can definitely answer this part of your question:

Is something available in CD Web Service when you install UGC?

Yes. When you install UGC, your CD Web Service will get new collections for these UGC item types:

  • Comments
  • ItemStats
  • Ratings
  • Users

You can get the most popular items like this:

.../odata.svc/ItemStats?$orderby=AverageRating desc

If you filter it first and then limit the number of results it'll probably result in a slightly faster query:

.../odata.svc/ItemStats?$orderby=AverageRating desc&$filter=AverageRating gt 0.0&$top=5

I expect that ItemStats are probably also available through the Java and .NET APIs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top