Tag Banners

:discourse2: Summary Tag Banners displays the tag name and description in a banner at the top of the page when visiting a tag-filtered topic list (similar to the Category Banners component)
:eyeglasses: Preview Preview on Discourse Theme Creator
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-tag-banners
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Features

Developer Notes

You can customize these banners with CSS. Each banner gets the tag name(s) appended as a class, for example:

.tag-title-header.tag-banner-art {
  background: salmon;
  color: beige;
}

The banner also works with tag intersections (e.g., community.example.com/tags/intersection/art/new-tag)

In this case, you’d target .tag-banner-art.tag-banner-new-tag for CSS customization.

Settings

Name Description
show on mobile Show tag banners on mobile devices
show tag description Show tag description when available
show above site header Display the banner in the above site header connector.
show below site header Display the banner in the below site header connector.
show above main container Display the banner in the above main container connector, for sites with the sidebar enabled.
remove tag hyphen Remove hyphens from tag names in banners
remove tag underscore Remove underscores from tag names in banners
hide tag icon Hide the tag icon when used along with category banners
show with category banners Show full banner alongside category banners

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

Last edited by @tobiaseigen 2025-06-24T03:17:47Z

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

A post was split to a new topic: ‘tag-banner’ class not being removed when navigating away

Bug: "Required" category of a tag not showing up under "category ..." dropdown

Summary: When creating a new topic from the homepage, all category options surface in the composer—as expected. But when you click into a tag (i.e. navigate to /tag/tag-name), and attempt to compose a new post from that page, all categories surface—except, ironically, the category that has set that particular tag among its requirements.

This problem stopped when disabling this component.

2개의 좋아요

배너의 태그 설명을 _cook_하는 것이 쉬울까요? (아니면 일반적인 태그 설명에서도 가능한가요?)

주제나 카테고리로 보내거나, 다른 관련 태그를 표시하는 데 유용하다고 생각합니다. 하지만 cook하지 않으면 불가능합니다.

감사합니다! :purple_heart:

이것을 다시 꺼내 봅니다 :shovel: :smiley:

“조리”(cook)란 기본적으로 마크다운, 이모지 등을 렌더링하는 것을 의미하나요? 그렇다면 훌륭한 추가 기능이 될 것 같습니다!

2개의 좋아요

제가 틀린 게 아니라면, 설명에 HTML을 사용할 수 있고, 올바르게 렌더링되어야 합니다.

1개의 좋아요

태그/카테고리 배너와 카테고리 설명에 일관되게 적용되면 좋겠습니다. HTML은 동작은 하지만, 너무 해킹적인 느낌이 듭니다!

4개의 좋아요

이 점에는 동의합니다

이 컨텍스트에서 태그 배너 안에 태그 아이콘 컴포넌트를 통해 추가된 아이콘도 렌더링할 수 있는 방법이 있을까요?

태그 아이콘 숨기기 설정이 있습니다. 혹시 그 설정 때문일까요?

설정은 카테고리 배너와 함께 사용할 때 태그 아이콘 숨기기로 되어 있습니다. 활성화되어 있든 비활성화되어 있든, 동시에 카테고리가 선택되었든 아니든 상관없이 태그 아이콘이 표시되지 않습니다.
3.5.0 안정판에서 테스트했습니다.