# Layouts Plugin

**URL:** https://meta.discourse.org/t/layouts-plugin/55208
**Category:** Plugin
**Tags:** pavilion, broken
**Created:** [January 5, 2017, 9:41am UTC](https://meta.discourse.org/t/layouts-plugin/55208 "2017-01-05T09:41:13Z")
**Posts on this page:** 20
**Page:** 12

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [April 19, 2019, 6:18am UTC](https://meta.discourse.org/t/layouts-plugin/55208/230 "2019-04-19T06:18:45Z")

</div>

Any idea why the layouts work perfectly fine in one subcategory:

 ![SNAG-0003](https://global.discourse-cdn.com/meta/original/3X/3/e/3ee326d044c5b59e272c1f43422f06bb2103beb7.png)

but not in another?

 ![SNAG-0001](https://global.discourse-cdn.com/meta/original/3X/e/f/efb8d119efe540a667dce2e776b215de92ba9653.png)

> **[Asia Pacific](https://www.hungryonion.org/c/regions/world/87)**
>
> Asia, Australasia

---

<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: [April 19, 2019, 6:32am UTC](https://meta.discourse.org/t/layouts-plugin/55208/231 "2019-04-19T06:32:38Z")

</div>

It’s the tags and specifically this line:

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

You can either reduce the number of tags or try this:

```plaintext
.topic-list-item .discourse-tags {
   display: unset;
}

```

That will cause them to wrap, hopefully.

(NB `inline-block` also works but `unset` works even better in this case)

---

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [April 21, 2019, 11:07pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/232 "2019-04-21T23:07:23Z")

</div>

Thank you so much! That works.

---

<div class="post-metadata">

### Author: ![eextra](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eextra/32/170266_2.png) [@eextra](https://meta.discourse.org/u/eextra)
#### Post date: [May 7, 2019, 6:28am UTC](https://meta.discourse.org/t/layouts-plugin/55208/233 "2019-05-07T06:28:27Z")

</div>

Thanks for nice work.  
but  
When i tick: _Enable right sidebar globally_ to **yes or no** there is no timeline on the topic. It is a bug or no ?? (im testing the material theme)

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [May 7, 2019, 7:01am UTC](https://meta.discourse.org/t/layouts-plugin/55208/234 "2019-05-07T07:01:09Z")

</div>

There will be another reason why you’re not seeing the timeline. Please try using the plugin by itself with other plugins and themes disabled.

My [Sandbox](https://discourse.angusmcleod.com.au) has this plugin installed, has `enable right sidebar globally` turned off and you can still see topic timelines, e.g. [https://discourse.angusmcleod.com.au/t/test-event-for-bug/898](https://discourse.angusmcleod.com.au/t/test-event-for-bug/898)

Also make sure you haven’t included “topic” in the ` layouts sidebar right enabled` setting.

---

<div class="post-metadata">

### Author: ![BobbyZopfan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bobbyzopfan/32/149374_2.png) [@BobbyZopfan](https://meta.discourse.org/u/BobbyZopfan)
#### Post date: [May 19, 2019, 7:11am UTC](https://meta.discourse.org/t/layouts-plugin/55208/235 "2019-05-19T07:11:56Z")

</div>

So much functionality has been provided (you people are great) that it has become rather tough to understand all the options which cross depend on each other (layout vs location plugins) for a power user (but not powerful tech) like me.

But I understand that I shouldn’t bite more than I can chew. But again, can’t help myself when see something new and useful.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [May 20, 2019, 7:21am UTC](https://meta.discourse.org/t/layouts-plugin/55208/236 "2019-05-20T07:21:20Z")

</div>

> [@BobbyZopfan](#):
>
> So much functionality has been provided (you people are great) that it has become rather tough to understand all the options which cross depend on each other (layout vs location plugins) for a power user (but not powerful tech) like me.

I agree! I’m going to be updating the first post of this plugin topic, and my other plugin topics soon with a standardised template that makes it easier to understand the functionality and how to implement it on your site.

If you have any specific use cases in mind for this plugin let me know and I can help you out.

---

<div class="post-metadata">

### Author: ![exetico](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/exetico/32/119962_2.png) [@exetico](https://meta.discourse.org/u/exetico)
#### Post date: [May 27, 2019, 2:24pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/237 "2019-05-27T14:24:46Z")

</div>

EDIT:

Let’s not talk about why it’s fixed, or not…

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/1/016b949f40073c1c0c19d19775f26f2ad769fe1f.png)

_Sorry_ 😉 🙂 (Missed that option)

---

<div class="post-metadata">

### Author: ![BobbyZopfan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bobbyzopfan/32/149374_2.png) [@BobbyZopfan](https://meta.discourse.org/u/BobbyZopfan)
#### Post date: [July 24, 2019, 5:52am UTC](https://meta.discourse.org/t/layouts-plugin/55208/238 "2019-07-24T05:52:19Z")

</div>

I also was wondering about this.

---

<div class="post-metadata">

### Author: ![sfoster](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@sfoster](https://meta.discourse.org/u/sfoster)
#### Post date: [August 15, 2019, 11:53am UTC](https://meta.discourse.org/t/layouts-plugin/55208/239 "2019-08-15T11:53:21Z")

</div>

Can you create the Widgets that will be used by Layouts Plugins in a theme component or do the Widgets have to be created by a Plugin also?

---

<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: [August 15, 2019, 11:56am UTC](https://meta.discourse.org/t/layouts-plugin/55208/240 "2019-08-15T11:56:54Z")

</div>

Probably both will work, I’ve created them in plugins.

The only advantage of doing the latter is you can programmatically set up the widget locations in plugin.rb without having to use Admin.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [August 15, 2019, 9:38pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/242 "2019-08-15T21:38:25Z")

</div>

> [@sfoster](#):
>
> Can you create the Widgets that will be used by Layouts Plugins in a theme component or do the Widgets have to be created by a Plugin also?

Yes you can!

There’s both a server-side and client-side interface for adding widgets.

Import this function

```plaintext
import { addCustomWidget } from 'discourse/plugins/discourse-layouts/discourse/widgets/sidebar';

```

Then use it like this in an initializer

```plaintext
addCustomWidget({
  name: <widget name>,
  position: <side you want it to appear on>,
  order: <order relative to other widgets on the same side>
})

```

Also make sure it’s enabled, either site-wide (in site settings) or for a specific category (in category settings).

---

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [September 9, 2019, 7:17am UTC](https://meta.discourse.org/t/layouts-plugin/55208/243 "2019-09-09T07:17:18Z")

</div>

> [@angus](#):
>
> > using CSS to make the map bigger, like taller in height, for example.
> 
> You can do this by adding some custom css to your theme in Admin \> Customize. The rule you want to change is:
> 
> ```plaintext
> .nav-container .locations-map:not(.expanded) {
> height: 170px;
> }
> 
> ```
> 
> Make sure you include the `:not(.expanded)` .

Any idea if the CSS for this needs to be changed recently? Just updated to the latest and the CSS doesn’t work any more. I still see the use of .nav-container and .locations-map when I inspect the elements from the browser.

Cheers.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [September 11, 2019, 10:23am UTC](https://meta.discourse.org/t/layouts-plugin/55208/244 "2019-09-11T10:23:49Z")

</div>

Nothing changed in the plugin, but the Discourse css might have changed.

This is the topic list Map right? Try

```plaintext
#list-area .locations-map:not(.expanded) {
  ...
}

```

---

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [September 11, 2019, 3:33pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/245 "2019-09-11T15:33:29Z")

</div>

Thanks, but no luck. Threw just about every element in there and no change:

```
.list-area .widget-container .nav-container .leaflet-container .locations-map:not(.expanded) {
  height: 750px;
}

```

---

<div class="post-metadata">

### Author: ![ckshen](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@ckshen](https://meta.discourse.org/u/ckshen)
#### Post date: [September 11, 2019, 3:35pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/246 "2019-09-11T15:35:59Z")

</div>

Solved it: need the !important comment. thanks for the help.

```
.nav-container .locations-map:not(.expanded) {
  height: 750px !important;
}

```

---

<div class="post-metadata">

### Author: ![tohaitrieu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tohaitrieu/32/151338_2.png) [@tohaitrieu](https://meta.discourse.org/u/tohaitrieu)
#### Post date: [October 7, 2019, 3:42am UTC](https://meta.discourse.org/t/layouts-plugin/55208/247 "2019-10-07T03:42:23Z")

</div>

It’s working fine in my website at [https://babyforex.net](https://babyforex.net). But, if you use right sidebar in Topic View, You shouldn’t use DiscoTOC: [DiscoTOC - automatic table of contents](https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143)

 ![32%20AM](https://global.discourse-cdn.com/meta/original/3X/4/f/4f2c951df53dcde5b673f390c05f75309d53f4c1.jpeg)

---

<div class="post-metadata">

### Author: ![tohaitrieu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tohaitrieu/32/151338_2.png) [@tohaitrieu](https://meta.discourse.org/u/tohaitrieu)
#### Post date: [October 21, 2019, 9:29am UTC](https://meta.discourse.org/t/layouts-plugin/55208/248 "2019-10-21T09:29:07Z")

</div>

At the topic Page,

Post Navigation is hidden.

 ![17%20PM](https://global.discourse-cdn.com/meta/original/3X/a/5/a5ca2242c1418d3b4a2d0e13eeb6dae22911c6ba.jpeg)

I think Post Navigation can move to left of site and Sidebar is on the right site.

---

<div class="post-metadata">

### Author: ![ashishsecdev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ashishsecdev/32/142265_2.png) [@ashishsecdev](https://meta.discourse.org/u/ashishsecdev)
#### Post date: [December 25, 2019, 10:33pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/249 "2019-12-25T22:33:28Z")

</div>

Is it showing me error - **“No setting named 'layouts\_sidebar\_left\_enabled”** exists and same for any settings that I am trying to make in it.

---

<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: [December 27, 2019, 7:40am UTC](https://meta.discourse.org/t/layouts-plugin/55208/250 "2019-12-27T07:40:25Z")

</div>

Can you please elaborate on the steps you are taking to get that error? Please provide enough detail so that someone can reproduce it.

Are you using an up-to-date official Discourse build? We only support our plugins on `tests-passed` branch.

[Previous page](https://meta.discourse.org/t/layouts-plugin/55208.md?page=11)

[Next page](https://meta.discourse.org/t/layouts-plugin/55208.md?page=13)
