Customize new topic button text

Discourse
Tue, 20 Jun 2023 21:11:06 +0000
Theme component

| |
| Summary | Customize the new topic button per category or tag
| Preview | Preview on Discourse Theme Creator
| Repository | https://github.com/discourse/discourse-customize-new-topic-button-text
| Install Guide | How to install a theme or theme component
| New to Discourse Themes? | Beginner’s guide to using Discourse Themes

Install this theme component

As this is an official theme component maintained by the Discourse team, Support, Bug, UX, and Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate theme component tag. Click on a link below to get one started.

Support Bug UX Feature

Features

This theme component allows you to customize the New Topic button on a category or tag topic list as well as the action name and button in the composer (highlighted below). If you have a Bug category, for example, you can update these texts to say “Report Bug”:

(Some icons may need to be added to your svg icon subset admin setting)

You can also customize the reply button text, this will replace the reply text in the composer and within topics:

Settings

Name | Description
custom new topic text | This is where you enter the details for each customized button
inherit parent category | When disabled, subcategories will not automatically inherit the parent category text

There are two settings, the primary being custom new topic text:

This setting allows you to set the filter (tag or category name), the icon for the “New Topic” button (this doesn’t change the icons in the composer), as well as the action name at the top of the composer, and the composer’s “Create Topic” button.

There’s an additional setting, enabled by default, called inherit parent category. When this is enabled all child categories will also have their text changed (unless otherwise specified in the settings).

Note that if you set up a tag it will override the selected category.

Ideas for future enhancements

Localizable text for different languages

Support for category and tag combinations, and multiple tags

Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.

Last edited by @JammyDodger Tuesday, June 11, 2024 10:21 PM UTC
Check document (нажмите для более подробной информации)

26 сообщений - 15 участников