# Embedding Categories in Existing SPA

**URL:** https://meta.discourse.org/t/embedding-categories-in-existing-spa/242950
**Category:** Support
**Created:** [October 26, 2022, 10:04am UTC](https://meta.discourse.org/t/embedding-categories-in-existing-spa/242950 "2022-10-26T10:04:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![stack](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@stack](https://meta.discourse.org/u/stack)
#### Post date: [October 26, 2022, 10:04am UTC](https://meta.discourse.org/t/embedding-categories-in-existing-spa/242950/1 "2022-10-26T10:04:30Z")

</div>

Hello,

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?

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [October 26, 2022, 10:21am UTC](https://meta.discourse.org/t/embedding-categories-in-existing-spa/242950/2 "2022-10-26T10:21:13Z")

</div>

Hello and welcome @stack 🙂

Depending on your e-learning platform, you may find the [Discourse Learning Management System Integration (LTI 1.3 Authentication)](https://meta.discourse.org/t/discourse-learning-management-system-integration-lti-1-3-authentication/196174) useful?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 26, 2022, 12:09pm UTC](https://meta.discourse.org/t/embedding-categories-in-existing-spa/242950/3 "2022-10-26T12:09:19Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![stack](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@stack](https://meta.discourse.org/u/stack)
#### Post date: [October 26, 2022, 1:55pm UTC](https://meta.discourse.org/t/embedding-categories-in-existing-spa/242950/4 "2022-10-26T13:55:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 26, 2022, 2:12pm UTC](https://meta.discourse.org/t/embedding-categories-in-existing-spa/242950/5 "2022-10-26T14:12:32Z")

</div>

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](https://meta.discourse.org/t/serve-discourse-from-a-subfolder-path-prefix-instead-of-a-subdomain/30507).

You can also [Embed Discourse comments on another website via Javascript](https://meta.discourse.org/t/embed-discourse-comments-on-another-website-via-javascript/31963). 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`).
