# How to make a theme component for TL-based banner

**URL:** <https://meta.discourse.org/t/how-to-make-a-theme-component-for-tl-based-banner/88014>\
**Category:** Development\
**Created:** [21.Май.2018 12:15:31 UTC](https://meta.discourse.org/t/how-to-make-a-theme-component-for-tl-based-banner/88014 "2018-05-21T12:15:31Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)\
**Post date:** [21.Май.2018 12:15:31 UTC](https://meta.discourse.org/t/how-to-make-a-theme-component-for-tl-based-banner/88014/1 "2018-05-21T12:15:31Z")

</div>

it should be possible to write the banner-topic in different `<div>`'s and then use the condition for trust level mentioned [here](https://meta.discourse.org/t/how-to-create-a-new-topic-button-with-category-and-topic-template/85775/7) to show-hide the corresponding div to user, i.e.:

` if (Discourse.User.current() && trust >= "2") {`

for e.g. show the first div to the TL0, the second to TL1, … .

`#banner-content div:nth-of-type(1) { display: none; }`

is it possible? if yes, does anyone know how to make the theme?

* * *

I’m trying something like this, but it doesn’t work. I appreciate hints:

**header** :

```plaintext
<script type="text/discourse-plugin" version="0.8.18">
    api.onPageChange(() => {
        if (Discourse.User.current() && trust == "0") {$('#banner-content div:nth-child(1)').addClass( "TL-selected" );}
    });
</script>

```

**css** :

```plaintext
#banner-content {display: none; }

#banner-content .TL-selected {display: block;}

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-make-a-theme-component-for-tl-based-banner/88014)._
