# Layouts Plugin

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

<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: [2018 年 12 月 14 日午前 4:07 UTC](https://meta.discourse.org/t/layouts-plugin/55208/210 "2018-12-14T04:07:56Z")

</div>

I’ve made some updates to the layouts plugin and the layouts-topic-list that will fix the issue you’re seeing and also allow you to show a bookmark list.

The layouts-topic-list widget is now a general purpose topic list widget that lets you display multiple topic lists, set using the site setting `layouts topic lists`.

**UI**

 ![Screenshot%20at%20Dec%2014%2015-04-40](https://global.discourse-cdn.com/meta/original/3X/6/5/65d0e46a9ff806ad59a62d6ff3cbe2480403c40a.png)

**Settings**

 ![48%20PM](https://global.discourse-cdn.com/meta/original/3X/e/e/eead7a0f61180a89229b35b185eee6fc9d9fd7c8.png)

You can see it in action on my sandbox here: [https://discourse.angusmcleod.com.au/c/layouts](https://discourse.angusmcleod.com.au/c/layouts)

---

<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: [2018 年 12 月 15 日午後 3:15 UTC](https://meta.discourse.org/t/layouts-plugin/55208/211 "2018-12-15T15:15:26Z")

</div>

@angus I believe there may have been a bug introduced in the re-factor, as my custom html side-bar disappeared.

I’ve submitted a small PR to hopefully resolve:

[https://github.com/angusmcleod/discourse-layouts/pull/8/files](https://github.com/angusmcleod/discourse-layouts/pull/8/files)

---

<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: [2018 年 12 月 15 日午後 6:59 UTC](https://meta.discourse.org/t/layouts-plugin/55208/212 "2018-12-15T18:59:28Z")

</div>

Brilliant - thanks! But, i’ve a problem here..

The topic-list is enabled:

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

A few is added:

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

And layouts sidebar is enabled at the frontpage:

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

But nothing shows up:

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

Am i missing something, or could this be a bug? The topic list was disabled in the Layout-settings for a short amount of time. (`layouts enabled` is also ticked, ofc.)

---

<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: [2018 年 12 月 15 日午後 7:25 UTC](https://meta.discourse.org/t/layouts-plugin/55208/213 "2018-12-15T19:25:01Z")

</div>

> [@exetico](#):
>
> Am i missing something, or could this be a bug?

Yes, did you read my post? 😉

---

<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: [2018 年 12 月 15 日午後 7:34 UTC](https://meta.discourse.org/t/layouts-plugin/55208/214 "2018-12-15T19:34:49Z")

</div>

No words from my end…

FML 🙂 Thanks.

---

<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: [2018 年 12 月 15 日午後 7:35 UTC](https://meta.discourse.org/t/layouts-plugin/55208/215 "2018-12-15T19:35:48Z")

</div>

Hopefully my PR will fix it. Sort of glad it wasn’t just me as it confirms the issue and the fact I wasn’t going crazy 🙂

---

<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: [2018 年 12 月 17 日午前 1:57 UTC](https://meta.discourse.org/t/layouts-plugin/55208/216 "2018-12-17T01:57:32Z")

</div>

@merefield @exetico Thanks guys, the issue should be resolved now:

[https://github.com/angusmcleod/discourse-layouts/commit/76f73929868e3048ad1bb6894c72e63387a94fbd](https://github.com/angusmcleod/discourse-layouts/commit/76f73929868e3048ad1bb6894c72e63387a94fbd)

---

<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: [2018 年 12 月 17 日午前 10:34 UTC](https://meta.discourse.org/t/layouts-plugin/55208/217 "2018-12-17T10:34:50Z")

</div>

Yep, confirming your updates work fine for my instances, thanks!

---

<div class="post-metadata">

### Author: ![haffax7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/haffax7/32/123146_2.png) [@haffax7](https://meta.discourse.org/u/haffax7)
#### Post date: [2018 年 12 月 18 日午前 12:06 UTC](https://meta.discourse.org/t/layouts-plugin/55208/218 "2018-12-18T00:06:32Z")

</div>

Did you solve it?

Same here

---

<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: [2018 年 12 月 18 日午前 12:23 UTC](https://meta.discourse.org/t/layouts-plugin/55208/219 "2018-12-18T00:23:28Z")

</div>

@haffax7 Are you on the latest versions of the Custom Layouts and Layouts Topic List Plugins? Check /admin/upgrade

---

<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: [2018 年 12 月 18 日午前 11:21 UTC](https://meta.discourse.org/t/layouts-plugin/55208/220 "2018-12-18T11:21:49Z")

</div>

Guess `overflow:hidden` will be a good idea, and maybe consider to remove all HTML-elements.

Example with both things present:

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/6/965010e401283b3b717249942cb49f8786d8c595.png)

Handling of fx `'` and other things could also be a good idea 🙂

_BUT, with that said_:  
Thanks for the fixes! 🙂

---

<div class="post-metadata">

### Author: ![haffax7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/haffax7/32/123146_2.png) [@haffax7](https://meta.discourse.org/u/haffax7)
#### Post date: [2018 年 12 月 20 日午前 6:51 UTC](https://meta.discourse.org/t/layouts-plugin/55208/221 "2018-12-20T06:51:41Z")

</div>

I set like this.  
Is there anything I need to do in addition?  
Thanks

 ![32_1](https://global.discourse-cdn.com/meta/original/3X/8/9/89d51f2da955639e9daeaead44db369817420f13.jpeg)

 ![32_2](https://global.discourse-cdn.com/meta/original/3X/c/1/c1d38475c31d598e189f22787cf0c30f6dfd0b48.jpeg)

 ![32_3](https://global.discourse-cdn.com/meta/original/3X/4/1/411352218bdf1eb1ff5f68a8c0b72d5f55be2669.jpeg)

 ![32_4](https://global.discourse-cdn.com/meta/original/3X/b/5/b58296d16f71301bacce1a093a994f1f8c1205f2.jpeg)

---

<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: [2018 年 12 月 20 日午後 4:19 UTC](https://meta.discourse.org/t/layouts-plugin/55208/222 "2018-12-20T16:19:31Z")

</div>

Did you enable the plugin in settings?

AND: Note that Custom Layouts only make it possible to use layout/widget-plugins, so you actually need another plugin for fx [topic-list](https://github.com/angusmcleod/layouts-topic-list), [custom html](https://github.com/angusmcleod/layouts-custom-html) and so on.

Enter settings:  
 ![image](https://global.discourse-cdn.com/meta/original/3X/3/9/39d0a5d6e7ced9012ec36151aa9c19cef2f75a5b.png)

For the right sidebar, you need to define where it’s enabled, fx. `latest` or enabled it globally (2). You’ll also need to enable layouts overall. (1)

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

++ each layout/widget should have a position defined within the custom “Layouts”-tab in the Admin-panel.

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/0/8001d771204502dcbf92ef11a549ee259fbb4b1e.png)

_This was a fast one.. Hope it make a bit of sense 🙂_

---

<div class="post-metadata">

### Author: ![haffax7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/haffax7/32/123146_2.png) [@haffax7](https://meta.discourse.org/u/haffax7)
#### Post date: [2018 年 12 月 21 日午前 1:10 UTC](https://meta.discourse.org/t/layouts-plugin/55208/223 "2018-12-21T01:10:19Z")

</div>

> AND: Note that Custom Layouts only make it possible to use layout/widget-plugins, so you actually need another plugin for fx [topic-list](https://github.com/angusmcleod/layouts-topic-list), [custom html](https://github.com/angusmcleod/layouts-custom-html) and so on.

Thanks 😁

---

<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: [2019 年 3 月 19 日午後 12:52 UTC](https://meta.discourse.org/t/layouts-plugin/55208/224 "2019-03-19T12:52:08Z")

</div>

@angus, I’ve opened a PR with a tailored version of @vinothkannans fix as this plugin is also presently breaking the host site. I’ve tested it successfully on two of my sites but please review.

[https://github.com/angusmcleod/discourse-layouts/pull/9](https://github.com/angusmcleod/discourse-layouts/pull/9)

NB Couldn’t assign you as reviewer on Github for this plugin.

---

<div class="post-metadata">

### Author: ![c0ry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/c0ry/32/134424_2.png) [@c0ry](https://meta.discourse.org/u/c0ry)
#### Post date: [2019 年 3 月 19 日午後 1:49 UTC](https://meta.discourse.org/t/layouts-plugin/55208/225 "2019-03-19T13:49:11Z")

</div>

Is this a fix for this plugin? Cause when I try to use it, this happens:

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

---

<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: [2019 年 3 月 19 日午後 2:10 UTC](https://meta.discourse.org/t/layouts-plugin/55208/226 "2019-03-19T14:10:38Z")

</div>

No this fix prevents your entire site from breaking as the plugin was no longer compatible with the core build on tests-passed. Similar to [Topic List Previews (legacy) - #326](https://meta.discourse.org/t/topic-list-previews/101646/326)

What widgets do you have installed? The plugin only provides a framework and you need to add other ‘widgets’ for it to actually do anything. See the OP.

---

<div class="post-metadata">

### Author: ![c0ry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/c0ry/32/134424_2.png) [@c0ry](https://meta.discourse.org/u/c0ry)
#### Post date: [2019 年 3 月 19 日午後 3:01 UTC](https://meta.discourse.org/t/layouts-plugin/55208/227 "2019-03-19T15:01:08Z")

</div>

This is what I have installed. Yet, nothing shows on the plugins list.  
The last one I installed was the layouts plugin (I downloaded the modules first on accident, but they still loaded and I could see the plugin list)

 ![](https://global.discourse-cdn.com/meta/original/3X/0/4/0497770a6a154aa3128783aade4097d5c06ddf53.png)

---

<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: [2019 年 3 月 19 日午後 5:48 UTC](https://meta.discourse.org/t/layouts-plugin/55208/228 "2019-03-19T17:48:21Z")

</div>

If the Layouts plugin was correctly installed you’d also see a Layouts route top right in Admin.

I’d check two places:

- /logs
- Javascript console (F12 → Console on Chrome)

Do you see any errors?

---

<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: [2019 年 3 月 19 日午後 10:57 UTC](https://meta.discourse.org/t/layouts-plugin/55208/229 "2019-03-19T22:57:06Z")

</div>

Thanks @merefield. Fix merged 👍

[前のページ](https://meta.discourse.org/t/layouts-plugin/55208.md?page=10)

[次のページ](https://meta.discourse.org/t/layouts-plugin/55208.md?page=12)
