Topic Footer Buttons

:discourse2: Summary Custom Topic Button defines a button visible at the bottom of your topic to open a URL of your choice.
Custom Group Topic Button defines a button visible at the bottom of your topic to open a URL of your choice, with added group visibility options.
:eyeglasses: Preview Preview on Discourse Theme Creator
(Custom Topic Button)
:hammer_and_wrench: Repository Link(s) https://github.com/discourse/discourse-custom-topic-button-component

https://github.com/discourse/discourse-topic-group-button-component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install Custom Topic Button

Install Custom Group Topic Button

Features

Hi, let me introduce you to two new simple theme components which have essentially the same goal but are slightly different:

This component will let you define a button visible at the bottom of your topic to open a URL of your choice.

You can customise label/title/icon/link. Links accept multiple placeholders:

<TOPIC_ID>
<USER_ID>
<USERNAME>
<TOPIC_TITLE>
<TOPIC_SLUG>

which will be replaced accordingly.

Has the same behaviour, except you can define a group to limit the visibility of this button.


These components are very simple right now, we could improve them in the future if we see real usage of them and issues.

Settings

Custom Topic Button

Name Description
custom topic button enabled
custom topic button url
custom topic button title Button description here..
custom topic button label Click Me
custom topic button icon

Custom Group Topic Button

Name Description
topic group button enabled
topic group button url
topic group button title Button description here..
topic group button label Click Me
topic group button allowed group
topic group button icon

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

Last edited by @JammyDodger 2024-06-15T19:16:42Z

Check documentPerform check on document:
22개의 좋아요

이것이 작동하지 않는 것 같습니다. api.registerTopicFooterButton를 직접 시도해 보았지만 작동하지 않았고, 미리보기 링크조차 작동하지 않았습니다.
javascripts/discourse의 일반적인 사용 방식은 작동하므로, 스크립트 태그 때문일 것으로 추정됩니다.

저는 첫 번째 구성 요소를 그대로 시도해 보았는데, 정상적으로 동작합니다:

이상하네. 내 폰과 노트북에서 테마 생성기 미리보기 링크를 누르면 그런 버튼이 없는 주제로 연결돼.

1개의 좋아요

아, 테마 생성기를 말씀하시는 거군요. 저한테도 작동하지 않습니다. 하지만 로컬 설치에서는 작동하긴 합니다.

3개의 좋아요