Plugin Outlet Locations

(Mittineague) #1

I’ve still got a lot to learn, and this is a very simple plugin.

But it is my hope that it will prove useful for others wanting to get into Discourse plugin development

Any questions or suggestions are more than welcome
(other than criticizing my poor design skills that is, I know that :smirk:)


This plugin allows developers to easily see were plugin-outlet locations are inserted into hbs templates.
True, plugin-outlet locations may be used for purposes other than adding visual content, this plugin is only a starting point.

Things that may be of interest

In addition to showing where the plugin-outlet is, it shows a way to allow all staff to see the additional tab, or restrict it to Admins only.

Shows a way to add a text input in the ACP Settings page that is used by the plugin.

Shows a way to use the client.en.yml file to add custom text


If you are developing your own plugin, please note:
The plugin.rb file must have both the name: and version: comments or the plugin will break the Admin Plugins page.
yml files are very sensitive to correct indentation or the entire app will fail, please validate your yml files.


If you are developing your own plugin, please note:
Although not necessary, having Admin Settings toggles are a courtesy to others so they won’t need to uninstalll the plugin to deactivate it.
To have a link to a plugins “home” page in the Admin Plugins there must be a url: comment in the plugin.rb file.
Giving template files the hbs extension, (and JavaScript files the es6 extension), allow Discourse to do “magic”

Beginner's Guide to Creating Discourse Plugins Part 2: Plugin Outlets
Discourse Development Contribution Guidelines
Adding plugin-outlets using a theme
Seeking a better way to organize plugin site settings
(Benjamin Kampmann) #2

Very nice, @Mittineague! I think that will help others develop plugins much more. Also, the tips section is really nice. Have you thought about creating a plugin-template (I can assure you, I have :wink: ).

May I do one request? Could you edit the first post of the topic, to state, what the plugin does and maybe outline the features (basically just copy paste part of the readme from the repo here)? I found it very useful to have a short overview on discourse, too .

Thanks heaps!

(Mittineague) #3

Please Note

Currently, having this plugin installed interferes with the Solved plugin so that the “solved by” does not display in the OP. i.e. the

Note that AFAIK it does not break the Solved plugin in any other way.

As it is unlikely that this plugin will be used in production sites this is not a big problem,
but, if you are also testing the Solved plugin you should be aware of this conflict.

My best guess is it has something to do with sharing the plugin-outlet, but I have not been able to determine the cause yet, :sadpanda:

(Mittineague) #4

Well, it’s taken longer than I would have expected it to, but I’ve finally managed to get the plugin up-to-date.

Some of it isn’t needed by the plugin but is included as working examples of

Beginner’s Guide to Creating Discourse Plugins Part 5: Admin Interfaces


Beginner’s Guide to Creating Discourse Plugins Part 6: Acceptance Tests

And there is still a to-do list (isn’t there always?), but if you have the previous version you should switch to this newer version.

(Erlend Sogge Heggen) #5

This is great! Added a mention of it to our Contribution Guidelines.

(Joe Buhlig) #6

Awesome! This keeps me from searching the master repo and hunting down CSS classes. :wink:

(Angus McLeod) #7

A useful plugin. Helps me to visualize the best spot to insert new content. Thanks!

(Angel Raul Molina Muñoz) #8

I’m starting developing my first plugin and this one is soooooo awesome for that, man, thank you so much :thumbsup: