# Need help with theme template after\_header.html

**URL:** https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773
**Category:** Development
**Created:** [April 23, 2019, 11:28pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773 "2019-04-23T23:28:15Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Faye\_Polson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/faye_polson/32/139125_2.png) [@Faye\_Polson](https://meta.discourse.org/u/Faye_Polson)
#### Post date: [April 23, 2019, 11:28pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/1 "2019-04-23T23:28:15Z")

</div>

I am brand spankin’ new at Discourse dev, and have been muddling along making a theme the last couple of days.

I’m stuck trying to use handlebars in after\_header.html.

I would like the end result to be, directly below my header, a small banner that outputs the site description.

```handlebars
<div class="banner">
  {{siteSettings.title}} 
</div>

```

I know I need some sort of type=‘text/x-handlebars’ script call before hand but I have NO idea what should be in the data-template-name and nothing I’ve tried works. I also don’t want the title, I actually want the site description, but {{siteSettings.site\_description}} doesn’t seem to work (I tried it in a template where handlebar was working). I’ve spent probably 2 hours researching this and I am just at a loss with this forum and how to find what I’m looking for.

Can anyone help?

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [April 24, 2019, 1:02am UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/2 "2019-04-24T01:02:42Z")

</div>

This would be one way to do it, you can add all of this to your `header.html` file. Essentially you need to make the data available for use in your template. [Connector classes are explained a bit here](https://meta.discourse.org/t/important-changes-to-plugin-outlets-for-ember-2-10/54136).

```xml
<script type="text/discourse-plugin" version="0.8">
  const ajax = require('discourse/lib/ajax').ajax;
    api.registerConnectorClass('top-notices', 'custom-content', { 
        setupComponent(args, component) {
            $(function() {
              ajax("about.json").then (function(result){ // get about.json
                component.set('about-site', result.about); // set component with results of about.json
              });
          });
        }
    });
</script>

<script type="text/x-handlebars" data-template-name="/connectors/top-notices/custom-content" >
   <p> {{about-site.description}} </p> <!-- Access description from about.json -->
</script>

```

This uses the plugin outlet called `top-notices` which is positioned similarly to `after_header.html`

There might be a simpler way, but this makes it easy to add a bunch of standard HTML in the template as well, and also makes it easy to pull in related content (anything that’s in [about.json](https://meta.discourse.org/about.json) in this case)… for example `{{about-site.title}}`

---

<div class="post-metadata">

### Author: ![Faye\_Polson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/faye_polson/32/139125_2.png) [@Faye\_Polson](https://meta.discourse.org/u/Faye_Polson)
#### Post date: [June 7, 2019, 7:19pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/3 "2019-06-07T19:19:19Z")

</div>

Thanks for your help but I am still very lost. Sorry for the late reply, have not been back on this project for a bit.

I’ve added all the script provided here to my header.html but it’s outputting nothing, including my html around the {{about-site.description}}

Secondly, I don’t have a call in my about.json to get the short description because I couldn’t find what I’m supposed to put there to do that.

Any help you have would be appreciated. I’m still struggling with this.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [June 7, 2019, 7:25pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/4 "2019-06-07T19:25:54Z")

</div>

> [@Faye\_Polson](#):
>
> I’ve added all the script provided here to my header.html but it’s outputting nothing, including my html around the {{about-site.description}}

Hmm, I just tried it again and it works for me. You have your site description filled out in your site settings? did you do a full refresh of the page? that would be necessary after adding the code above.

---

<div class="post-metadata">

### Author: ![Faye\_Polson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/faye_polson/32/139125_2.png) [@Faye\_Polson](https://meta.discourse.org/u/Faye_Polson)
#### Post date: [June 7, 2019, 7:26pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/5 "2019-06-07T19:26:20Z")

</div>

Just to clarify - I am attempting to go and get the SETTINGS Site Description that the site admin can fill out, so that they can change it if need be, and have the banner on their site update to match without needing a theme change.

---

<div class="post-metadata">

### Author: ![Faye\_Polson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/faye_polson/32/139125_2.png) [@Faye\_Polson](https://meta.discourse.org/u/Faye_Polson)
#### Post date: [June 7, 2019, 7:27pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/6 "2019-06-07T19:27:06Z")

</div>

Whoops, sorry I missed seeing your reply there, thanks for your quick response! Yes, I went and filled out my site description, and I’ve refreshed repeatedly.

---

<div class="post-metadata">

### Author: ![Faye\_Polson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/faye_polson/32/139125_2.png) [@Faye\_Polson](https://meta.discourse.org/u/Faye_Polson)
#### Post date: [June 7, 2019, 7:28pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/7 "2019-06-07T19:28:52Z")

</div>

![24%20PM](https://global.discourse-cdn.com/meta/original/3X/4/4/4428cec6a4faae6883e15b03f58f9be49452fb9a.png) Here’s my code, the canusemes are an attempt to see ANYTHING

---

<div class="post-metadata">

### Author: ![Faye\_Polson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/faye_polson/32/139125_2.png) [@Faye\_Polson](https://meta.discourse.org/u/Faye_Polson)
#### Post date: [June 7, 2019, 7:29pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/8 "2019-06-07T19:29:35Z")

</div>

![35%20PM](https://global.discourse-cdn.com/meta/original/3X/d/9/d9d714bcf5cf2b6b82c0d85e5007e9865da3883b.png) And here’s my output. You can see CAN YOU SEE THIS FAYE at the top, verifying this change went up.

---

<div class="post-metadata">

### Author: ![Faye\_Polson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/faye_polson/32/139125_2.png) [@Faye\_Polson](https://meta.discourse.org/u/Faye_Polson)
#### Post date: [June 7, 2019, 7:50pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/9 "2019-06-07T19:50:40Z")

</div>

Well I MUST have had something wrong in my copy and paste because I just wiped the file and started over with it with your code and it popped in. It’s not in the right place, but I’m super happy to see the description in there!

Will see if I can get it into the right place after the nav. Not sure what I’m looking for to do that.

---

<div class="post-metadata">

### Author: ![Faye\_Polson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/faye_polson/32/139125_2.png) [@Faye\_Polson](https://meta.discourse.org/u/Faye_Polson)
#### Post date: [June 7, 2019, 7:58pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/10 "2019-06-07T19:58:06Z")

</div>

“below-site-header” will do it. Yay!

Thank you so much for your time Kris! I super appreciate this. You’re awesome.

---

<div class="post-metadata">

### Author: ![lionel-rowe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lionel-rowe/32/134288_2.png) [@lionel-rowe](https://meta.discourse.org/u/lionel-rowe)
#### Post date: [June 7, 2019, 8:00pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/11 "2019-06-07T20:00:33Z")

</div>

For future reference, it looks like the issue was here:

```handlebars
<div> {{about-site.description}} </p> </div>
                                   ^

```

You had a stray closing tag, which wouldn’t immediately break your site if it was plain HTML, but will cause an error and fail to render in handlebars.

In future, you can check your browser console (Ctrl + Shift + J in Chrome) to check for any error output.

---

<div class="post-metadata">

### Author: ![Faye\_Polson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/faye_polson/32/139125_2.png) [@Faye\_Polson](https://meta.discourse.org/u/Faye_Polson)
#### Post date: [June 7, 2019, 8:22pm UTC](https://meta.discourse.org/t/need-help-with-theme-template-after-header-html/115773/12 "2019-06-07T20:22:36Z")

</div>

Completely missed that. Thanks!
