# Add HTML above

**URL:** https://meta.discourse.org/t/add-html-above/346573
**Category:** Support
**Created:** [January 10, 2025, 8:38pm UTC](https://meta.discourse.org/t/add-html-above/346573 "2025-01-10T20:38:35Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![good\_guy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/good_guy/32/479589_2.png) [@good\_guy](https://meta.discourse.org/u/good_guy)
#### Post date: [January 10, 2025, 8:38pm UTC](https://meta.discourse.org/t/add-html-above/346573/1 "2025-01-10T20:38:35Z")

</div>

![](https://global.discourse-cdn.com/meta/original/4X/a/2/0/a201bc216ae87b39f6f9d99c1519363a803a76d7.png)  
Is there any way I can add HTML above this area (home page above categories/posts)?

---

<div class="post-metadata">

### Author: ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)
#### Post date: [January 10, 2025, 9:41pm UTC](https://meta.discourse.org/t/add-html-above/346573/2 "2025-01-10T21:41:59Z")

</div>

I think yes

we have plugin outlet available here

> [@(deprecated) Plugin outlet locations theme component](https://meta.discourse.org/t/plugin-outlet-locations-theme-component/100673):
>
> mega the ability to debug plugin outlets is now included in core. Check out [this topic](https://meta.discourse.org/t/introducing-discourse-developer-toolbar/346215) for more details play_button Original theme component info

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [January 11, 2025, 2:56am UTC](https://meta.discourse.org/t/add-html-above/346573/3 "2025-01-11T02:56:14Z")

</div>

You could do something like this:

```html
<script type="text/x-handlebars" data-template-name="/connectors/before-topic-list/NameOfThing">
  <div class="className">
    <p>Hi there!</p>
  </div>
</script>

```

This renders the text in the `before-topic-list` outlet.  
You can change the outlet and component names in `data-template-name`.

Be sure to put this in Customize \> CSS \> New component \> Edit CSS/HTML \> Head.

---

<div class="post-metadata">

### Author: ![good\_guy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/good_guy/32/479589_2.png) [@good\_guy](https://meta.discourse.org/u/good_guy)
#### Post date: [January 11, 2025, 3:03am UTC](https://meta.discourse.org/t/add-html-above/346573/4 "2025-01-11T03:03:04Z")

</div>

> [@NateDhaliwal](#):
>
> ```plaintext
> <script type="x-handlebars" data-template-name="/connectors/before-topic-list/NameOfThing">
> <div class="className">
> <p>Hi there!</p>
> </div>
> </script>
> 
> ```

Hey, that didn’t work, nothing appeared, could you double check the code? Is NameOfThing supposed to be there?

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [January 11, 2025, 3:11am UTC](https://meta.discourse.org/t/add-html-above/346573/5 "2025-01-11T03:11:17Z")

</div>

Sorry, it’s supposed to be `text/x-handlebars` instead. I have edited my post.

> [@good\_guy](#):
>
> Is NameOfThing supposed to be there?

Yes, that is the name of the component. You can change it to anything you want.

Also, you may want to use the `above-main-containter` outlet.

---

<div class="post-metadata">

### Author: ![good\_guy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/good_guy/32/479589_2.png) [@good\_guy](https://meta.discourse.org/u/good_guy)
#### Post date: [January 11, 2025, 3:24am UTC](https://meta.discourse.org/t/add-html-above/346573/6 "2025-01-11T03:24:27Z")

</div>

> [@NateDhaliwal](#):
>
> above-main-containter

What’s the directory for `above-main-containter`, does it go in type or data-template-name?

I’m specifically looking to make it above everything **but not** above the navbar **(for all pages)**

 ![A webpage displaying categories like News & Announcements and General for social media updates. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/b/4/3/b439dc8d73f91625f82740f9c7ee4df45ed68f87.png)

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [January 11, 2025, 3:27am UTC](https://meta.discourse.org/t/add-html-above/346573/7 "2025-01-11T03:27:28Z")

</div>

Just replace `before-topic-list` with `above-main-container`. It would be below the header.  
The `above-main-container` outlet will display on all pages.  
Also, I made a typo: `container` not `containter`.

---

<div class="post-metadata">

### Author: ![good\_guy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/good_guy/32/479589_2.png) [@good\_guy](https://meta.discourse.org/u/good_guy)
#### Post date: [January 11, 2025, 4:02am UTC](https://meta.discourse.org/t/add-html-above/346573/8 "2025-01-11T04:02:56Z")

</div>

```plaintext
<script type="x-handlebars" data-template-name="/connectors/above-main-container">
    <p>Hi there!</p>
</script>

```

With and without NameOfThing it doesn’t show still, I am placing it in **Head**

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [January 11, 2025, 4:06am UTC](https://meta.discourse.org/t/add-html-above/346573/9 "2025-01-11T04:06:24Z")

</div>

It seems that you are using `x-handlebars`, but

> [@NateDhaliwal](#):
>
> it’s supposed to be `text/x-handlebars` instead. I have edited my post.

It also must have the component name after the outlet, or it will not work.

> [@NateDhaliwal](#):
>
> `NameOfThing`

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 11, 2025, 9:42am UTC](https://meta.discourse.org/t/add-html-above/346573/10 "2025-01-11T09:42:09Z")

</div>

You can use this now:

> [@Introducing Discourse developer toolbar](https://meta.discourse.org/t/introducing-discourse-developer-toolbar/346215):
>
> When running the [latest version of Discourse core](https://github.com/discourse/discourse/commit/498481e5be21780c20e3646bd934eb9d7316a8f8) in a development environment, you’ll notice a new toolbar on the left-hand-side of the screen: This provides one-click access to commonly-needed developer tools. So far, we have: electric_plug Plugin Outlet Debug This shows all plugin outlets, with tooltips showing realtime values of all of the available @outletArgs. This was inspired by the popular [plugin outlet locations](https://meta.discourse.org/t/plugin-outlet-locations-theme-component/100673) theme component, and [the plugin before it](https://meta.discourse.org/t/plugin-outlet-locations/29589). But un…

(Just to add, thank you to @RGJ for creating and supporting that component for so long, it has been very useful 🙏)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [February 10, 2025, 9:42am UTC](https://meta.discourse.org/t/add-html-above/346573/11 "2025-02-10T09:42:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
