Let’s say I’d like to override a hbs template from a plugin, like the amazing Events plugin.
I’ve tried the following scripts:
<script type="text/x-handlebars" data-template-name="components/events-calendar-day">
***some stuff so category icon could be displayed instead of circle***
</script>
<script type="text/x-handlebars" data-template-name="/plugins/discourse-events/assets/javascripts/discourse/templates/components/events-calendar-day">
***some stuff so category icon could be displayed instead of circle***
</script>
but they are not executed. I guess the template is not found at that location, so how can I access it ? Are plugins templates in their own directory ? If so, where ? This is not explained in the theme guide.
As far as I understand, the «root» folder is (discourse/app/assets/javascripts/discourse/app/templates/) so I can access a component in a subfolder from this path.
But the template I want to access is in:
discourse/plugins/discourse-events/assets/javascripts/discourse/templates/components/
which is not a subfolder of the first one. Is there a way to modify those without forking the plugin ?
Or do you mean I should use /javascripts/discourse/templates/components/template-name ?
(I’ve tried and it does not seems to work but I may have done some other mistake.)