# So fügen Sie aktuelle und beliebte Themen ein?

**URL:** https://meta.discourse.org/t/how-to-embed-recent-and-popular-topics/133947
**Category:** Support
**Created:** [20. November 2019 um 18:26 UTC](https://meta.discourse.org/t/how-to-embed-recent-and-popular-topics/133947 "2019-11-20T18:26:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Tino\_Augustine](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Tino\_Augustine](https://meta.discourse.org/u/Tino_Augustine)
#### Post date: [20. November 2019 um 18:26 UTC](https://meta.discourse.org/t/how-to-embed-recent-and-popular-topics/133947/1 "2019-11-20T18:26:58Z")

</div>

Weiß jemand, wie man die neuesten und beliebtesten Beiträge von Discourse auf einer anderen Website einbettet?

Ich suche nach einer Lösung, die dem unten gezeigten Layout ähnelt. Kann mir jemand die Anleitung zum Einbetten von Discourse auf einer anderen Website zur Verfügung stellen?

 ![embed%20discourse%20latest%20and%20popular%20topic%20in%20another%20website](https://global.discourse-cdn.com/meta/original/3X/b/3/b33d0559e1253adde2024205756ef932331f1a05.png)

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [20. November 2019 um 18:28 UTC](https://meta.discourse.org/t/how-to-embed-recent-and-popular-topics/133947/2 "2019-11-20T18:28:16Z")

</div>

Schauen Sie sich das hier an

> [@Embedding a list of Discourse Topics in another site](https://meta.discourse.org/t/embedding-a-list-of-discourse-topics-in-another-site/125911):
>
> If you grab the latest builds of Discourse you’ll get a [the ability to embed topic lists](https://github.com/discourse/discourse/commit/23367e79ea735598766ec6f507f6132e0bad3dba) in other sites via some simple Javascript and HTML. The typical use case for this is a blog or other content driven site, where you want a widget on the side of the screen that lists topics. You can filter by category, tag, or [any of the other public](https://github.com/discourse/discourse/blob/master/lib/topic_query.rb#L51-L73) filter options available. How to Embed a list of Topics First, you must enable the embed topics list site setting. Then, in your HTML add a \<script\> tag that…

---

<div class="post-metadata">

### Author: ![Tino\_Augustine](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Tino\_Augustine](https://meta.discourse.org/u/Tino_Augustine)
#### Post date: [22. November 2019 um 19:42 UTC](https://meta.discourse.org/t/how-to-embed-recent-and-popular-topics/133947/3 "2019-11-22T19:42:00Z")

</div>

@Johani

Ich habe versucht, die Anweisungen in dieser Diskussion zu befolgen, konnte das Iframe auf meiner Joomla-Website jedoch nicht erfolgreich einbinden.

Hier ist das Beispiel-Skript, das ich erstellt habe:

1. Folgendes wurde im Templates-Bereich hinzugefügt, wo ich Skripte einfügen kann:

`<script src="https://example.com/javascripts/embed-topics.js"></script>`

1. Folgendes wurde als HTML-Modul an einer bestimmten Position hinzugefügt.

`<d-topics-list discourse-url="https://example.com/latest"></d-topics-list>`

Aber das ist es, was auf der Frontend-Seite angezeigt wird.

 ![15%20AM](https://global.discourse-cdn.com/meta/original/3X/1/8/180d135661a9231b599a3da3195fa7f4d131f982.png)

Was ich auf meiner Website anzeigen möchte, sind die neuesten 5 oder 10 Beiträge aus meinem Discourse-Forum.

---

<div class="post-metadata">

### Author: ![Tino\_Augustine](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Tino\_Augustine](https://meta.discourse.org/u/Tino_Augustine)
#### Post date: [23. November 2019 um 10:38 UTC](https://meta.discourse.org/t/how-to-embed-recent-and-popular-topics/133947/4 "2019-11-23T10:38:32Z")

</div>

Schließlich konnte ich die Einbettung mit folgendem Code erfolgreich durchführen:

1. Folgendes wurde im Templates-Bereich hinzugefügt, wo ich Skripte einfügen kann:

`<script src="https://example.com/javascripts/embed-topics.js"></script>`

1. Folgendes wurde als HTML-Modul an einer bestimmten Position hinzugefügt:

`<d-topics-list discourse-url="https://example.com"></d-topics-list>`

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [23. Dezember 2019 um 10:38 UTC](https://meta.discourse.org/t/how-to-embed-recent-and-popular-topics/133947/5 "2019-12-23T10:38:34Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
