Is there a way I can use the built in component editor in discourse UI to create some HTML content to show up in a plugin outlet (plugin outlet name : before-create-topic-button)?
The doc I am reading (Using Plugin Outlet Connectors from a Theme or Plugin - Documentation / Developer Guides - Discourse Meta ) doesn’t make it clear if this should be possible from the UI?
I am not able to find anywhere in the UI to be able to define a new handlebar template.. in the theme editor nor in the component editor.
Is this not supported? Any help or pointing me in the right direction would be appreciated!
This has very recently changed and now you should really do this in javascript, which conveniently now has its own tab.
I would start here:
Discourse uses the Ember JS Framework for its user interface. On top of Ember, Discourse provides a number of APIs to allow themes to customize the user interface. The most commonly-used API is Plugin Outlets.
These outlets are positioned throughout Discourse core, and allow themes to render Ember Components inside them. Those components are given access to some contextual information called “outlet args”.
Some outlets also “wrap” part of the core user interface, which allows themes to add the…
2 Likes
Perfect, I was able to get a proof of concept going. Thank you sir!
3 Likes