Tag Banner

: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 Mi Piace

Un post è stato diviso in un nuovo argomento: ‘tag-banner’ class non viene rimossa quando si naviga via

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

Riepilogo: Quando si crea un nuovo argomento dalla homepage, tutte le opzioni di categoria compaiono nel composer, come previsto. Ma quando si fa clic su un tag (ad esempio, si naviga su /tag/nome-tag) e si tenta di comporre un nuovo post da quella pagina, compaiono tutte le categorie, tranne, ironicamente, la categoria che ha impostato quel particolare tag tra i suoi requisiti.

Questo problema si è interrotto disabilitando questo componente.

2 Mi Piace

Sarebbe facile cucinare la descrizione del tag nel banner? (O comunque nelle normali descrizioni dei tag?)

Trovo utile poter inviare questo a argomenti o categorie, o per indicare un altro tag correlato… Ma senza la cottura, non è fattibile.

Grazie! :purple_heart:

Tirando fuori questo :shovel: :smiley:

Per “renderizzare”, si intenderebbe fondamentalmente visualizzare markdown, emoji, ecc.? Sarebbe una grande aggiunta!

2 Mi Piace

Se non sbaglio, puoi usare l’HTML nelle descrizioni e dovrebbe essere renderizzato.

1 Mi Piace

Sarebbe fantastico averlo coerente tra banner di tag/categorie e descrizioni di categorie. L’HTML è utilizzabile, ma sembra molto una soluzione di ripiego!

3 Mi Piace

Sono d’accordo su questo
In questo contesto, c’è un modo per renderizzare anche le icone aggiunte tramite il componente icona del tag all’interno del banner del tag?

C’è un’impostazione nascondi icona tag. Potrebbe essere quella?

L’impostazione è Nascondi l'icona del tag quando utilizzata insieme ai banner di categoria. Nessuna icona di tag viene visualizzata sia che sia abilitata o disabilitata. Sia con che senza categoria selezionata contemporaneamente.
Testato su 3.5.0 stabile