# Custom Topic Button

**URL:** https://meta.discourse.org/t/custom-topic-button/36217
**Category:** Plugin
**Tags:** deprecated
**Created:** [December 1, 2015, 9:36pm UTC](https://meta.discourse.org/t/custom-topic-button/36217 "2015-12-01T21:36:34Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [December 1, 2015, 9:36pm UTC](https://meta.discourse.org/t/custom-topic-button/36217/1 "2015-12-01T21:36:34Z")

</div>

> ℹ **Deprecated:** There is now a #Customization > Theme component that provides the same feature: [Topic Footer Buttons](https://meta.discourse.org/t/topic-footer-buttons/116968)

**Summary** : This plugin adds a custom button at the bottom of a topic, **visible to everyone** (who is logged in).

🔗 **GitHub** : [https://github.com/techapj/discourse-custom-topic-button](https://github.com/techapj/discourse-custom-topic-button)  
➡ **Install** : Follow the [plugin installation guide](https://meta.discourse.org/t/install-a-plugin/19157).

### Features

 ![](https://global.discourse-cdn.com/meta/original/3X/7/7/77135e9c656f9644f069e26d62490e9b9670ddec.png)

### Configuration

From Admin \> Site Settings \> Plugin, modify

- `custom_topic_button_url`
- `custom_topic_button_title`
- `custom_topic_button_label`

_Note:_ For button to be visible only to staff or members of a specific group, see:

> [@Custom Topic Button (group)](https://meta.discourse.org/t/add-a-button-at-the-bottom-of-a-topic-visible-to-a-specific-group-discourse-topic-group-button/36216):
>
> information_source Deprecated: There is now a #Customization > Theme component that provides the same feature: [Topic Footer Buttons](https://meta.discourse.org/t/topic-footer-buttons/116968) Summary: This plugin adds a custom button at the bottom of a topic, visible only to staff or members of a specific group. link GitHub: [https://github.com/discourse/discourse-topic-group-button](https://github.com/discourse/discourse-topic-group-button)arrow_right Install: Follow the [plugin installation guide](https://meta.discourse.org/t/install-a-plugin/19157). Features Configuration From Admin \> Site Settings \> Plugin, modify topic\_group\_button\_url t…

### CHANGELOG

### TODO

---

<div class="post-metadata">

### Author: ![danielabc](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@danielabc](https://meta.discourse.org/u/danielabc)
#### Post date: [January 28, 2023, 6:00pm UTC](https://meta.discourse.org/t/custom-topic-button/36217/5 "2023-01-28T18:00:34Z")

</div>

when I click on the button it opens a link on another page, how do I click on the button and it opens on the same page?

---

<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: [January 30, 2023, 6:50pm UTC](https://meta.discourse.org/t/custom-topic-button/36217/6 "2023-01-30T18:50:43Z")

</div>

I’m not sure, but I believe there are a couple of official theme components that are the up-to-date method of acheiving this. [Topic Footer Buttons](https://meta.discourse.org/t/topic-footer-buttons/116968)

Do they behave in a similar way?

---

<div class="post-metadata">

### Author: ![danielabc](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@danielabc](https://meta.discourse.org/u/danielabc)
#### Post date: [January 30, 2023, 6:58pm UTC](https://meta.discourse.org/t/custom-topic-button/36217/7 "2023-01-30T18:58:10Z")

</div>

I installed them, but both open the link in another window, is there any way for it to open in the same window?

---

<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: [January 30, 2023, 8:22pm UTC](https://meta.discourse.org/t/custom-topic-button/36217/8 "2023-01-30T20:22:26Z")

</div>

Hmmm. 🤔 If I’m reading it right, I think it’s part of the theme component code that it opens in a new window:

> <https://github.com/discourse/discourse-custom-topic-button-component/blob/58d126cfe13a6cd13ee6842d719a32b5690d8bb2/common/head_tag.html#L35>

> **(and the plugins too I think)**
>
> [discourse-custom-topic-button/assets/javascripts/discourse/connectors/after-topic-footer-main-buttons/custom-public-button.js.es6 at c4a91727c0322f0c59bc09af7fbcb076b5676de4 · arpitjalan/discourse-custom-topic-button · GitHub](https://github.com/techAPJ/discourse-custom-topic-button/blob/c4a91727c0322f0c59bc09af7fbcb076b5676de4/assets/javascripts/discourse/connectors/after-topic-footer-main-buttons/custom-public-button.js.es6#L5)

It does not seem that there’s currently a way through the UI to change that. It may be possible to amend that behaviour with a bit of custom work, but I’m afraid that’s not my forte. 🙂

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [January 30, 2023, 10:48pm UTC](https://meta.discourse.org/t/custom-topic-button/36217/9 "2023-01-30T22:48:23Z")

</div>

Hi koliwi, I’ll try to have a look at the theme component to add this feature this week. 🙂

---

<div class="post-metadata">

### Author: ![danielabc](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@danielabc](https://meta.discourse.org/u/danielabc)
#### Post date: [January 31, 2023, 3:27am UTC](https://meta.discourse.org/t/custom-topic-button/36217/10 "2023-01-31T03:27:29Z")

</div>

Is this plugin yours? Congratulations for the work, I really liked it! If you can open it in the same window it will be even better! Thanks!

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [January 31, 2023, 11:44am UTC](https://meta.discourse.org/t/custom-topic-button/36217/11 "2023-01-31T11:44:08Z")

</div>

It’s not mine, but I can have a look at it nonetheless. I’ll let you know 🙂

---

<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: [June 18, 2024, 3:27pm UTC](https://meta.discourse.org/t/custom-topic-button/36217/12 "2024-06-18T15:27:06Z")

</div>


