since my original request got a bit lost and I have done some research since, I will open a separate topic since this touches some fundamental stuff on how to extend and re-use Discourse components, I guess. What I want to do for my shoutbox plugin is put a topic (say, with a fixed ID 1243; I have the basics here already figured out) into a dropdown box like this:
…click the bullhorn icon and get this:
…for this, I have sucessfully re-defined the
header.hbs where I put the icon, and have introduced a new template named, say,
shoutbox.hbs. In this template, I have already copied the relevant excerpt of
topic.hbs in order to fill it with the contents of topic 1234.
Now we’re approaching the area where I am stuck: no matter what I extend, model, view or controller, it seems I cannot simply inject the topic ID somewhere in order to fill the shoutbox.hbs template with data. I’m also not clear about the role of PostStream and whether or not I need to do something with it. Introducing an extension to the topic route is also not really clear to me, since the original code
discourse/routes extends right into an instance of that class - can I extend that or do I have to copy it?
And hints where to pull would be great. Extensive debugging was a cul de sac, too because the
routes/topic.js.es6 seems to be the only non-Ember call on the stack, so I guess I should start there, but have got no clue on how to do that…