Using the Ratings System

With Liferay DXP’s asset framework, users can use a content rating system and rate or value content. Many of DXP’s built-in content types have ratings enabled by default.

Ratings Types

The following types of ratings are available out-of-the-box for compatible assets:

  • Likes: Content has a heart icon for users to “like” the content. The total number of likes is shown next to the heart button.

    Users can like content with the Likes rating type.

  • Stars: Content is rated from 1 to 5 stars. The content’s total star rating is shown next to the drop-down menu.

    Users can rate content from 1 to 5 stars with the Stars rating type.

  • Stacked Stars: Content is rated from 1 to 5 stars in a horizontal selection. The content’s total star rating is shown above the user’s selection.

    Users can rate content from 1 to 5 stars with the Stacked Stars rating type, similarly to the standard Stars rating type.

  • Thumbs: Content is given either a “thumbs up” or “thumbs down” rating. The total number of thumbs up or down is shown next to each thumb button.

    Users can give content either a thumbs up or thumbs down with the Thumbs rating type.

Ratings Value Conversion

Because the different types of configurable ratings (likes, stars, etc.) are presented differently, the database stores a normalized ratings value for assets that have them enabled. If the ratings type of an asset is changed, the ratings are converted and carried over to the new type.

The following table shows how ratings from each type can be converted to the other types:

Converted to LikesConverted to StarsConverted to Thumbs Up/Down
LikesNo change1 Like = 5 Star rating1 Like = 1 Thumbs Up
Stars3-5 Stars = 1 Like; 1-2 Stars are omittedNo change3-5 Stars = 1 Thumbs Up; 1-2 Stars = 1 Thumbs Down
Thumbs1 Thumbs Up = 1 Like; Thumbs Down are omitted1 Thumbs Up = 5 Star rating; 1 Thumbs Down = 1 Star ratingNo change

Enabling Ratings for Your Content

Ratings can be configured for your content from the Site Settings menu (individually per Site).

From the Site menu, navigate to ConfigurationSettings, and then click the Social tab. Under the Ratings section, the rating type for each available asset type can be individually configured:

You can set the specific rating type for each asset type from the Site Settings menu.

Administrators can also enable or disable ratings for specific widgets across multiple Sites via the Control Panel, in either Instance Settings (for a single virtual DXP instance) or System Settings (globally).

From either of these settings menus, find the icon for the chosen asset type under Content and Data (for example, Blogs or Wiki). Then, choose the menu option for the specific widget under the WIDGET SCOPE header (e.g., Widgets Display):

Administrators can also enable or disable ratings for a widget across multiple Sites.

Note

Not every widget that supports content ratings can have ratings enabled or disabled from the Control Panel.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy