Add ability to route the New Topic button to a custom URL

nathank
Tue, 10 Jun 2025 22:52:38 +0000
Feature

I really like the Customize new topic button text Theme Component, but I need it to route to a Wizard from the Custom Wizard Plugin 🧙.

I can use the native functionality of the Plugin to do the routing, but when I attempt to use this TC to change the text and icon I lose this. This is due to the way the TC hides the ‘OG’ button and replaces it with a new one.

I suggest a new setting in the TC which allows the addition of a Custom URL which, if present, directs the replacement button to the desired location. Here is a PR to that effect:

github.com/discourse/discourse-customize-new-topic-button-text

Add Feature: Allow custom URL for New Topic button

main ← nathan-nz:main

opened 10:32PM - 10 Jun 25 UTC

nathan-nz

+20 -8

Adds the ability to specify a custom URL for the New Topic button. The classi…c use case is redirecting to a Custom Wizard for topic generation, but there are other situations in which this would be very helpful. If blank, falls back to the standard behaviour. See https://meta.discourse.org/t/add-ability-to-route-the-new-topic-button-to-a-custom-url/369638 for more info

I’m using it at present on our site, and it seems to be working well:

When clicked, it takes you to our Event topic creation wizard:

1 сообщение - 1 участник