What would be the best approach to enable/disable this on a per category basis? We’d like to have a more complex “polis-like” mechanism in some selected areas of our social intranet, but don’t want to detract from the welcoming and positive nature of “just likes” for the rest of the categories.
AI-generated summary
The discussion revolves around enabling reactions on a per-category basis in Discourse. Ralf_Stockmann seeks a way to implement a more complex reaction system in select categories without affecting others. Canapin explains that there is no built-in feature, but suggests hiding the reactions selector via CSS for specific categories, providing both a direct and a scalable SCSS solution. tobiaseigen points to alternative approaches, such as topic voting. Ralf_Stockmann confirms the CSS method worked well.
There is no such feature. A quick way to do it would be to hide the reactions selector with CSS, such as:
.category-general-resources .discourse-reactions-picker {
display: none;
}
If you want to iterate through multiple categories and make it easier to maintain, you can use a SCSS loop like this:
$categories: 'general', 'site-feedback', 'staff';
@each $category in $categories {
.category-#{$category} .discourse-reactions-picker {
display: none;
}
}
The category class is visible in the <body> tag.
It can be circumvented by any user that knows how to make it visible again client-side, but if your community is well-behaved, I think it’s a good workaround. ![]()
Have you looked at some other options in discourse to achieve what you want, such as:
This worked surprisingly well, thank you very much for this approach.