This is a field formatter for a selectlist with int values. Its use is to make some kind of ratingdisplay avaliable but without any processing! It just outputs an int select field as icons. You can use Fontawesome or any other iconservice using the same schema. The rating image can be ANY fontawesome icon. Apples, stars, circles you name it.

You can also use other icon libs. I for example use a custom one i generated with iconmoon because i dont want 4MB FA files to be loaded in the background.

How to use?

  1. Create a field list(int)
  2. Add selectable values like 1 2 3 4 5 6
  3. Chose the field formatter in the field settings to output and add your icon code
  4. Chose an icon from https://fontawesome.com/icons?d=gallery
  5. For example:
  6. Your selection is outputted with the icon!

I used it to rate books for my project about - EXAMPLE Audiobooks(Hörbücher) and output these ratings with stars.

Scroll down and you see some stars and dots: Example. In the backend that is just an in select field and i used views with my formatter to display it as icons. Do not be confused about interactive the rating at the top of the page. That is something different and can be done with the Rate or Fivestars Module

Why

I have already worked on Starrating in the D7 Version, but the D8 version has a dedicated own fieldttype. I see no use in creating a custom fielddtype so i used a core type that already exists.

Project information

Releases