Forum Discussion
As of right now I only have a textual representation like this:
<#-- TODO: Display as stars --> <#assign body = "Rating: ${review.reviews.rating.value} / 5" />
No, there is no need to calculate the average rating.
My question is: Is there some core Freemarker function / macro which takes a numeric rating value as a parameter and returns the HTML which is used to display the stars? I'm aware I could just do this by myself by copying / reimplementing the Lithium markup (different divs) but this doesn't seem very future-oriented to me. What if Lithium changes the markup in the future for example?
Thanks,
Moreno
Hi Moreno,
There is unfortunately no ratings-related Freemarker objects right now. At this point I believe you would need to re-build the UI for this yourself (which, like you say, could fall out-of-sync with any future changes Lithium makes).
-Doug
Related Content
- 4 years agoInactive User