keithkelly
2 years agoLeader
What's the Best Practice for showing Badge Count beside Profile Pic on all posts? (Caching?)
A reasonable request from SME's to encourage competition & bragging rights: Display a user's Badge Count beside their name / profile pic.
My current prototype feels like a worst practice:
<#assign userBadges = rest("/users/id/"+res.author.id+"/badges/?page_size=1000&restapi.response_style=view").user_badges />
<#assign userBadgeCount = userBadges.user_badge?size />
What are some best (or heck, at least less bad) practices for doing something like this?
(above, mocked up in a topic list by mistake 😂 ... we'd primarily want to use these within the discussions themselves.)
Sign in to react to this post