Plugin outlet locations theme component

Continuing the discussion from Plugin Outlet Locations:

I needed an updated version with all the plugin outlets that have been added recently and then I realised that it would be really easy to create a theme component for this, so there is no need to install a plugin any more.

Repository: GitHub - communiteq/plugin-outlets-theme-component

The repository includes a script (gen/generate.rb) that will auto-generate the outlets based on the Discourse source code.

To toggle the plugin outlets, click the “connector” icon in the top right.

When you click a specific plugin outlet, the display will change and you will be able to see all the arguments to the plugin outlet. Click it again to change it back.


Install this theme component

Theme preview: Theme Creator


Didn’t @Mittineague write something like this before?

1 Like

Yes, see the link at the very top of this topic, that refers to the topic about that. @Mittineague wrote a plugin in 2015. I was using it and then I found out that it needed to be updated (it hadn’t been updated for over 2 years).

The next step was me realizing that this could be done much easier now using a theme component.


Yes, I had started to update the plugin to take into account the changes in the number and locations of plugin outlets a few weeks ago, but other priorities moved it down on my ever growing todo list.

If the same information can be provided as a theme component that works in the GUI and doesn’t require editing app.yml and running launcher I think it would be easier for most. I may be wrong, but I have a feeling most prefer GUI over CLI.


I use this theme component (and the theme preview) a lot since I develop a few themes but I never thanked @RGJ

I can’t say how much time this theme component helped me save, but it’s a lot. Great job, very very useful.


I’m getting a “Bad Gateway” error when trying to install the component. Also when trying to paste the generated content into head_tag.html manually.

Is there a length limit for that file? Because it works fine when I split the content into two separate files.

There is no length limit (at least not one that is close to the current length of the file).

The theme component does take a while to install, your server might be not fast enough and time out because of the large number of plugin outlets / script fragments that are being used.


I found myself always adding/removing this theme during development to know plugin outlets. To make this easier in my dev environment, I added a toggle button to toggle the visibility of plugin outlet Perhaps others may find it useful so I created a PR for this.

Screen Shot 2021-11-12 at 11.49.51 AM


This is brilliant. Thank you!
PR merged.


Brilliant idea! I love the plugin button icon :slight_smile:

Just one issue, it seems that if you move to different routes, the toggle at top can get out of sync with contents outlets so you can never have everything on or off at the same time :sweat_smile: (which in my case was useful, but probably not desired generally?).



Aah yes, you’re right. :sweat_smile: I’ve switched to adding a class to the body to toggle the visibility and it seems to have resolved it. PR here:


What am I missing? I have installed the component. But do I still need to run the script in order to make this work? Is the script on my server somewhere where I can run it? or do I need to copy and paste? If I am modifying common/head_tag.html , do I need to put it back to disable this component?

The script is only there for plugin maintenance, you don’t need it.

Just install the theme component, add it to your main theme, and press the “plug” icon.



There’s a small bug when used along Custom Header Links (icons).
Clicking a custom header icon triggers the outlet button:

1 Like

There’s a little bug with the new user card as a theme component. I’m not sure it would happen when it’s shipped in core (if it is). Still… the outlets in the experimental user card still show up when outlets are toggled off:

BTW if I didn’t say it before, this theme component is absolutely awesome.


Yes, I can reproduce that, thank you for reporting this!! :+1:

I will ship a new version of the theme component early next week, it will have new outlets for 3.1 and a fix for this bug.


May I suggest a single setting? Choose the background color. I’m glad the “brutal red” was changed to a “poppin’ green”, but personally, I like toned-down colors. :slight_smile:

(I can PR, though)


New version!!

  • Updated with all the 3.2beta PluginOutlets
  • Configurable colors
  • Click an outlet to see the actual parameters :fire:



This seems lightly bugged, it’s now default enabled on every page refresh on my PC now, and it’s throwing a few depreciations:

[THEME 105 'Plugin Outlet Locations'] Deprecation notice: The header-icons widget has been deprecated and decorateWidget is no longer a supported override. [deprecated since Discourse v3.3.0.beta1-dev] [deprecation id: discourse.header-widget-overrides] [info:]
[THEME 105 'Plugin Outlet Locations'] Deprecation notice: The header-icons widget has been deprecated and attachWidgetAction is no longer a supported override. [deprecated since Discourse v3.3.0.beta1-dev] [deprecation id: discourse.header-widget-overrides] [info:]
1 Like

Ah, thank you for bringing that to my attention @Firepup650 ! :+1:
I only checked my plugins against that deprecation and forgot about my theme components.

I’ve pushed an update to fix this deprecation.

I will also update the component to include some newer plugin outlets shortly, but that takes some more time due to the new wrapper outlets.
I’ve also updated the component to include the latest plugin outlets, except for the wrapper outlets as those need some more time / refactoring.