1

I have created a table in Views 3 where ratings are averaged according to days of a week. But the ratings are showing as values between 1-100.

How can i convert these values in star rating from 1 to 5? I am unable to make it work either using Rate or Fivestar modules. I would prefer a solution through views ui but dont mind alternatives.

enter image description here

0

It should be easy with a simple theme file.
In the views interface, on the bottom right, you should see "Theme: informtion", click that and you will see relevant theme file names.
Using one like "views-view-field--rating.tpl.php" should work.

1
  • I am not a coder but i added this in the suggested template file..print round($output/20,1);. This formats the values between a range of 1-5. Hopefully this is the right way to do it, but anyway it works the way i intend to. Thanks for the pointer.
    – ahmadk
    May 10 '15 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.