# How to refresh topic title when it was changed in one of plugin's custom controllers

**URL:** <https://meta.discourse.org/t/how-to-refresh-topic-title-when-it-was-changed-in-one-of-plugins-custom-controllers/59480>\
**Category:** Development\
**Created:** [2017 年3 月 19 日 12:44 UTC](https://meta.discourse.org/t/how-to-refresh-topic-title-when-it-was-changed-in-one-of-plugins-custom-controllers/59480 "2017-03-19T12:44:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
发布日期： [2017 年3 月 19 日 14:12 UTC](https://meta.discourse.org/t/how-to-refresh-topic-title-when-it-was-changed-in-one-of-plugins-custom-controllers/59480/2 "2017-03-19T14:12:37Z")

</div>

There is a new event for this you can use after

[https://github.com/discourse/discourse/commit/f8a31d927f35e1302ec4788b8a430667f703f59a](https://github.com/discourse/discourse/commit/f8a31d927f35e1302ec4788b8a430667f703f59a)

`this.appEvents.trigger('header:update-topic', topic);`

Also, if you properly use `PostRevisor` this is handled automatically for you.

---

_[View the full topic](https://meta.discourse.org/t/how-to-refresh-topic-title-when-it-was-changed-in-one-of-plugins-custom-controllers/59480)._
