# Auszug des Themas ändern, um zum neuesten Beitrag statt zur spezifischen Nachricht zu gehen

**URL:** https://meta.discourse.org/t/change-excerpt-of-topic-to-go-to-latest-post-instead-of-that-specific-message/208148
**Category:** Support
**Created:** [3. November 2021 um 18:54 UTC](https://meta.discourse.org/t/change-excerpt-of-topic-to-go-to-latest-post-instead-of-that-specific-message/208148 "2021-11-03T18:54:11Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [4. November 2021 um 03:06 UTC](https://meta.discourse.org/t/change-excerpt-of-topic-to-go-to-latest-post-instead-of-that-specific-message/208148/2 "2021-11-04T03:06:04Z")

</div>

Willkommen bei Meta @Fma965 👋

Füge dies zum Tab `common > header` einer [neuen Theme-Komponente](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966#heading--2-3) hinzu und füge diese Komponente dann zu deinem Theme hinzu.

```xml
<script type="text/discourse-plugin" version="0.8">
const { on } = require("discourse-common/utils/decorators");

api.modifyClass("component:topic-list-item", {
  @on("didInsertElement")
  _changeExcerptLink() {
    const excerptLink = this.element.querySelector(".topic-excerpt");
    if (excerptLink) {
       excerptLink.href = this.topic.lastReadUrl 
    }
  }
});
</script>

```

Wenn du nun auf den Auszug klickst, wird der Benutzer zu _seinem_ zuletzt gelesenen Beitrag weitergeleitet.

---

_[View the full topic](https://meta.discourse.org/t/change-excerpt-of-topic-to-go-to-latest-post-instead-of-that-specific-message/208148)._
