Add HTML above


Is there any way I can add HTML above this area (home page above categories/posts)?

I think yes

we have plugin outlet available here

3 Likes

You could do something like this:

<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.

1 Like

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

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

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.

1 Like

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)

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.

1 Like
<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

It seems that you are using x-handlebars, but

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

1 Like

You can use this now:

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

4 Likes