Hey, I’m trying to add my own Raw template … not simply override an existing one.
Reason: trying to get rid of those nasty ember tags you get when using nested components.
… initially I assumed it would be as easy as just adding one to the templates or templates/list directory, so I went ahead and did that, only for it to silently fail (to find my template).
Perhaps I can confirm this is not supported?
Then I found this:
and this:
So I tried this:
import { addRawTemplate } from "discourse-common/lib/raw-templates";
import { compile } from "handlebars";
<---some init stuff -->
addRawTemplate('search-result-entry', compile(`<span class='result-lala'>hello</span>`));
You should be able to add a raw template straight to the templates folder. We did so in discourse-docs. They now use the .hbr file extension, so maybe that’s where things tripped up.