Embedding Categories in Existing SPA


I am evaluating several different OSS forums for our e-learning platform. We would like our students to be able to discuss topics from within our platform, without navigating away to a separately hosted discourse instance. Is this kind of embedding possible with Discourse? From my research, it looks like the answer is a firm no, and if that is the case, can you recommend any alternatives?

Hello and welcome @stack :slightly_smiling_face:

Depending on your e-learning platform, you may find the Discourse Learning Management System Integration (LTI 1.3 Authentication) useful?

1 Like

What e-learning package do you use?

Users mostly don’t notice urls, so with a bit of theming you can have discourse on a different server such that users don’t notice.

The e-learning platform is custom built. What we’d like is for students to be able to discuss the problem/solution in a forum pretty much exactly like Discourse, we just want to be able to embed the (dynamically created) category and comment box alongside the problem.

Worst case it’s looking like we will just redirect the user to the forum, but ideally we wouldn’t, and the forum would be integrated within the website itself.

If you think users will notice the difference between https://learing.com/forum/ and https://forum.learning.com , you can Serve Discourse from a subfolder (path prefix) instead of a subdomain.

You can also Embed Discourse comments on another website via Javascript. That will display some discussion on the page, but take users to Discourse to interact with the forum. That’s probably what I would recommend.

If what you want is the problem and the forum on the same page as other LMS stuff (which I don’t remember seeing in any of the LMSs that I have used), it’s possible to embed Discourse in an iframe (though it hasn’t always been the case, and it’s not well documented; there is a hidden site setting allow_embedding_site_in_an_iframe).

1 Like