VirtusLab-Open-Source/strapi-plugin-comments

How to add a custom field “rating”

Opened this issue · 3 comments

Hello, I need to add a custom “rating” field to the comment system so that the user can rate from 1 to 5.

Can you tell me how I can extend the standard layout and add a new field there?

I've read the official Strapi documentation on extensions, but unfortunately it didn't work out for me. I would be grateful for examples!

@MaximProger I would suggest you use the Reactions plugin to handle that :) It has got versions for v4 and v5 already.

@cyp3rius How can I add reactions to comments using the plugin?

@dogcalas you can simply create reactions against the Content Type plugin::comments.comment and use the Reactions Plugin endpoints to collect the counting. For more sophisticated changes, like enriching the Client API endpoints I suggest using the Strapi Extensions strategy to implement your own custom controllers.