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.

The readme includes a script that will auto-generate the outlets based on the Discourse source code.

   grep -r plugin-outlet /var/www/discourse/app/|grep name|grep -o -e 'name=".*'|awk -F\" '{print $2}'|sort|uniq | while read p ; do
     echo "<script type=\"text/x-handlebars\" data-template-name=\"/connectors/$p/plugin-outlet-component\">"
     echo "<div class=\"outlet\">$p</div>"
     echo "</script>"

Theme preview: Discourse Theme Creator


Super useful! Could you please add a couple of screenshots of what this looks like in practice?


Of course - see above :slight_smile:


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.