Change star symbol in Reviews widget

When working with the Reviews widget, you can change the symbol that is used for ratings, for example, replace the default star symbol with another one. You do this by editing the markup of the widget.

You first need to locate the template that you are using with the Reviews widget. There are two options:

  • If you are using a resource package, the template is located in SitefinityWebApp/ResourcePackages/[Package Name]/MVC/Views/Reviews/
  • If you are not basing your pages on a pure MVC template from any package, you need to copy the default widget template inside the SitefinityWebApp/Mvc/Views/Reviews/ folder.
    For details about default templates, see the GitHub repository.

Next, you edit both the Reviews.[name].cshtml and ReviewsCount.[name].cshtml files:

  1. Locate in both templates the <div> section containing the data-sf-role="rating-template"
  2. Replace the symbol in the inner <span> section with the markup that you want to use as a rating symbol.

Following are a few examples of rating symbols you can use:

stars Symbol &#9733;

music Symbol &#9834;

hearts -Symbol &#9829;

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Tags

Was this article helpful?