# 如何在 Discourse 插件的帖子菜单中添加切换按钮并为其实现一个动作？

**URL:** <https://meta.discourse.org/t/how-can-one-add-a-toggle-button-to-the-post-menu-and-implement-an-action-for-that-toggle-button-in-a-discourse-plugin/286835>\
**Category:** Development\
**Created:** [2023 年11 月 28 日 12:34 UTC](https://meta.discourse.org/t/how-can-one-add-a-toggle-button-to-the-post-menu-and-implement-an-action-for-that-toggle-button-in-a-discourse-plugin/286835 "2023-11-28T12:34:55Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![omppatil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omppatil/32/359876_2.png) [@omppatil](https://meta.discourse.org/u/omppatil)\
发布日期： [2023 年11 月 28 日 12:34 UTC](https://meta.discourse.org/t/how-can-one-add-a-toggle-button-to-the-post-menu-and-implement-an-action-for-that-toggle-button-in-a-discourse-plugin/286835/1 "2023-11-28T12:34:55Z")

</div>

您好！

我是 Discourse 插件开发新手，希望能得到一些帮助，在帖子菜单中添加一个切换按钮并实现插件中的相应操作。

---

_[View the full topic](https://meta.discourse.org/t/how-can-one-add-a-toggle-button-to-the-post-menu-and-implement-an-action-for-that-toggle-button-in-a-discourse-plugin/286835)._
