In a Support category topic titled “How to Include the Group ‘Request’ Button In a Topic Post?”, gassim asks if it’s possible to embed a functional “Request” button directly into a topic post that lets users join a group without navigating to the group page — similar to the built-in group request button. ondrej confirms this isn’t currently possible but suggests workarounds like linking to the group page or styling a custom button using theme components. pfaffman notes a theme component could potentially create such a button, though triggering it precisely may be complex. gassim clarifies they want the button to trigger the actual join request behavior, possibly by reusing a Discourse widget via JavaScript. pfaffman advises using a Glimmer component instead of deprecated widgets, though targeting a specific topic ID remains uncertain. Heliosurge shares a practical example using a simple link (<a href="/g/group/members">Apply</a>) that triggers a group message to owners — useful for closed groups, and potentially enabling instant join for open ones. Overall, while no native solution exists, custom theme components or Glimmer components may offer a path forward for advanced users.
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.
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.
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.”
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.