# Customizing main layout

**URL:** https://meta.discourse.org/t/customizing-main-layout/164903
**Category:** Support
**Created:** [September 22, 2020, 2:03pm UTC](https://meta.discourse.org/t/customizing-main-layout/164903 "2020-09-22T14:03:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![akapetzoglou1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akapetzoglou1/32/200426_2.png) [@akapetzoglou1](https://meta.discourse.org/u/akapetzoglou1)
#### Post date: [September 22, 2020, 2:03pm UTC](https://meta.discourse.org/t/customizing-main-layout/164903/1 "2020-09-22T14:03:35Z")

</div>

Hello, I want to add two columns (left and right) of the main-outlet, in order to use them as banners.

From what I understood already I can add new html code easily in the plugin-outlets space.  
But it’s not the thing I want to do since there exists no space for this banners already.

What should be my approach?

---

<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: [September 22, 2020, 2:06pm UTC](https://meta.discourse.org/t/customizing-main-layout/164903/2 "2020-09-22T14:06:30Z")

</div>

Take a look at:

> [@Layouts Plugin](https://meta.discourse.org/t/custom-layouts-plugin/55208):
>
> This plugin is a framework for custom Discourse layouts. Its main use case is adding sidebars to Discourse. Desktop Mobile (closed) Mobile (open)desktop_computer[Get the code](https://github.com/paviliondev/discourse-layouts)page_facing_up [Read the documentation](https://coop.pavilion.tech/c/documentation/discourse-layouts/92)bug [Report a bug](https://coop.pavilion.tech/w/bug-report)Quick Links [The advantages of the Layouts Plugin](https://coop.pavilion.tech/t/using-the-layouts-plugin/1737)[Installation and Setup](https://coop.pavilion.tech/t/installation-and-setup/1606)[Widget Development](https://coop.pavilion.tech/t/widget-development/1618)wave Before you post in this …

---

<div class="post-metadata">

### Author: ![akapetzoglou1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akapetzoglou1/32/200426_2.png) [@akapetzoglou1](https://meta.discourse.org/u/akapetzoglou1)
#### Post date: [September 22, 2020, 2:22pm UTC](https://meta.discourse.org/t/customizing-main-layout/164903/3 "2020-09-22T14:22:05Z")

</div>

Hm.. so I would create a widget for each banner and then load it, right ?

---

<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: [September 22, 2020, 2:25pm UTC](https://meta.discourse.org/t/customizing-main-layout/164903/4 "2020-09-22T14:25:03Z")

</div>

You might find the existing html widget does all you need. [GitHub - paviliondev/layouts-custom-html: A widget for the Layouts plugin that allows for Custom HTML to be inserted · GitHub](https://github.com/paviliondev/layouts-custom-html)

---

<div class="post-metadata">

### Author: ![akapetzoglou1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akapetzoglou1/32/200426_2.png) [@akapetzoglou1](https://meta.discourse.org/u/akapetzoglou1)
#### Post date: [October 2, 2020, 10:04am UTC](https://meta.discourse.org/t/customizing-main-layout/164903/5 "2020-10-02T10:04:52Z")

</div>

It probably is the solution. Although, I haven’t been able to make it work yet.

Can’t understand what you mean or how would I use the existing html widget. 😕  
So, I decided to create my own widget that would create the two banners and add them on the sides.

I created a widget: [https://github.com/teakap/banner-theme-component](https://github.com/teakap/banner-theme-component)

 ![banners_import](https://global.discourse-cdn.com/meta/original/3X/5/c/5c939f7d89d8bfe1e255db41374c69f6dda7aa78.jpeg)

It’s loaded, and I added as a widget to the layout setting but still I am not seeing the widget’s html on the page.

---

<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: [October 2, 2020, 1:01pm UTC](https://meta.discourse.org/t/customizing-main-layout/164903/6 "2020-10-02T13:01:28Z")

</div>

Great that you have delved in!

Always, always have your Browser console open when debugging javascript.

This is what I get:

![image](https://global.discourse-cdn.com/meta/original/3X/c/f/cf189b3eaf9707b4cf094deaf30c7fd24687f527.png)

You are missing an import statement:

`import { h } from 'virtual-dom';`

That then fixes it:

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/e/2e4e002c1be254f625e870ffeb904d09ff503217.png)

Note you should code it like this, though or your class name will show (like it does above):

`h ("span.some-banner-class", "my text")`:

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/5/6566147988a68c21a78662e490020211de29d952.png)

![image](https://global.discourse-cdn.com/meta/original/3X/d/b/db5af3c4f95990f87961b4b4202450b9af4d3a8f.png)

Keep going! 🙂

---

<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: [November 1, 2020, 1:13pm UTC](https://meta.discourse.org/t/customizing-main-layout/164903/7 "2020-11-01T13:13:49Z")

</div>

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