# 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:** 1
**Showing post:** 71

<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 7, 2017, 2:28am UTC](https://meta.discourse.org/t/layouts-plugin/55208/71 "2017-08-07T02:28:33Z")

</div>

Note to users of this plugin (@Pad_Pors) . I’ve changed the way widgets are enabled and positioned. Rather than listing widgets in settings, you now select the position and whether the widget is pinned in a separate admin panel.

 ![36 AM](https://global.discourse-cdn.com/meta/original/3X/e/7/e764db9fbe1143242f26cdc9ca4566adaf573d79.png)

Instead of monkey patching the SiteSetting model, i.e.

```plaintext
SiteSetting.class_eval do
  @choices[:layouts_sidebar_left_widgets].push('profile')
end

```

You now add widgets in your `plugin.rb` like so:

```plaintext
DiscourseLayouts::WidgetHelper.add_widget('election-list')

```

This will make them appear on the list of widgets in the new admin panel.

---

_[View the full topic](https://meta.discourse.org/t/layouts-plugin/55208)._
