How to Include the Group 'Request' Button In a Topic Post?

Hi
I’m creating a topic post where I will talk about a user group and I want the users to be able to click on a button to join directly from this topic post. Exactly like the ‘Request’ button they’ll see when they click on the link to view this group.

For example, in Discourse there’s the Discourse Support Explorers group:

Let’s say this topic was about this group and I’m inviting people to join that group. I could paste a link “Discourse Meta” and then as a second step they’ll need to click on the request button; however, let’s say I want them to be able to click on ‘Request’ directly on this topic post, is this possible or is this a feature request?

Note: I’m referring to groups that are in the same forum not an external one.

Something like below:

Click below to join now


Thanks!

2 Likes

AFAIK this isn’t possible the way you are thinking but it would be a neat idea :wink:

At the moment you can just create a link that takes you to the group eg.

Request

Or an image like you did above. But the user would still have to request join from the group page.

Or if you want something more fancy you could use Customize posts' contents with your own styles to create your own button style.

2 Likes

A theme component could create such a button, but I’m not sure how to trigger it where you want it.

2 Likes

Thanks! The customizations are great or even using an image, or theme component as @pfaffman suggested; however, I want the immediate action for the button to do what the ‘request’ button does in the group page. :slight_smile:

Maybe the theme component could grab the exact button and insert it right below the topic content using JavaScript, but I am still learning so I am not sure how to grad this. I think it’d be something like: “reusing a Discourse widget in a theme component.”

1 Like

You’d use a (new) glimmer component. (Widgets are deprecated). I think you could target the topic ID that you want it to go in, but I’m not quite sure how to do that offhand.

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

I use this for a closed group in a category that everyone can see but needs to join to participate.

In my case above it activates a group message to owners to request to join. Imagine if group is free to join it might work to instant join.

1 Like