Join Group Button on Group Pages

I’m trying to require users to join groups in order to post and reply. I did my research and have already configured the groupings and in each individual group, I’ve configured everything in the security section to not allow replies and posts for everyone and only for members. So that part is working.

However, it isn’t clear to users how or where to join the group. Is there a button that I can add, perhaps ‘Join Group’ that will allow them to join the group? Am i missing the button somewhere? I don’t see anything.

I technically can create a button and just link them to /g but that isn’t the best experience for users. Any insights and help would be appreciated!

2 Likes

Hi Marc

So everyone can see the category? Just not create/reply when not in the group? If this is the case, I think a workable solution would be this:

In the category settings, scroll down and find this

Then add something like this

You must be part of the <a href="https://your-site-name/g/group-name-here">Group-name-here</a> group to create topics in this category

This will display a small banner to users who are not in the group. Once they join it disappears.

1 Like

Is there not a simple ‘+ Join Group’ button I can use? It seems like a pretty standard feature that should be available, no?

If you

You could just link it to the group straight away and have the join button on the group.

image

To configure this go to the Manage tab in the group then Membership and check Allow users to join the group freely

I can technically do this yes. However, that button will be fixed even if you are already a member of the group which can be confusing.

If for example you are already a member of Group A but you still see a button that says ‘+ Join Group’. I need a more dynamic solution. I find it hard to believe that there isn’t already a native solution to this built in Discourse.

Any other ideas?

1 Like

The button changes to ‘Leave’ if you’re already a member of the group, if that helps you out at all? (assuming you also have ‘Allow users to leave the group freely’ set. If not, the join button isn’t present if you are already a member of the group)

3 Likes

This won’t work. I have over 30+ groups. One thing I’d like to do is add a button at the top of each Group to Join. I can add a static “Join” button that goes to the group page but that’s not the experience I am looking to do. I’d like users to join the group that they are on by simply pressing a button on the page without having to unnecessarily load the /g groups page. There’s just so many groups on that /g groups page that it is confusing. Unless there is a way to dynamically insert the button using handlebars or something, perhaps someone can help me with that?

As @ondrej mentioned

Here is M be in th category setting.

To participate in category you need to <a href="/g/Pimaxians/members">Apply</a>

Mine strips part of the HTTPS to just

“/g/Groupname/members”

This promp will submit a Join request to group owners. Just swap out Groupname with your groupname

This is a good workaround but I’d rather have the dynamic button that says ‘Join Group’ when a user isn’t part of the group or ‘Leave Group’ when they are. I wonder why this isn’t native to Discourse.

I’d assume that this isn’t a common use-case, and so it wasn’t seen as a needed core feature. I think you could theoretically do something with reverse engineering the discourse API, but I’m not sure.

Just an FYI, but it looks like your Join Groups button may be misaligned on some pages:

image

1 Like

On your Group Page if your Group settings allow free to join public and also have leave group enabled. You should see something like this.