Using the Ratings System

Using the Ratings System

Liferay DXP’s asset framework supports a content rating system that allows Users to 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 only has one button (with a heart icon) for users to “like” the content. The total number of likes is shown beside the heart button.

    Users can give content likes with the Likes rating type.

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

    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. The only difference between this rating type and the standard Stars type is how it appears on the screen.

    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 beside 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, then the ratings are converted and carry over to the new type.

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

Converted to Likes Converted to Stars Converted to Thumbs Up/Down
Likes No change 1 Like = 5 Star rating 1 Like = 1 Thumbs Up
Stars 3-5 Stars = 1 Like; 1-2 Stars are omitted No change 3-5 Stars = 1 Thumbs Up; 1-2 Stars = 1 Thumbs Down
Thumbs 1 Thumbs Up = 1 Like; Thumbs Down are omitted 1 Thumbs Up = 5 Star rating; 1 Thumbs Down = 1 Star rating No 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.


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

Additional Information