I am working on a plugin that adapts the current category/group paradigm to center content around groups (vs categories). Basically, the plugin ensures every group has exactly one category associated with it, and no one has privileges for that category except the members of the group. When a user wants to "post to the group' they are actually posting to the group's category.
The beginnings of the plugin have been easy to code. I hook into filter:groups.create
to automatically create a category with a group
property and attach the resulting cid
to the group. When the user wants to view the "group feed", I direct them to the group's category and hook into filter:category.get
to attach the group to the category before it gets sent to the client.
Where I am stuck, however, is the templates. As a proof of concept for the plugin, I combined groups/details.tpl
file and the category.tpl
from the persona theme. The information all displays properly, including the group admin panel for if necessary for the user. There is just one major problem -- the javascript interactions on the group panels don't work. A user can't leave the group, grant/rescind ownership, etc. I need help understanding why this is so?? I spend the majority of my time in Angular, and to be honest haven't yet got a clear grip on NodeBB templating.
I am hoping this is an easy solve, but I keep running into dead ends. Would much appreciate any thoughts on this!