Overriding template
-
How does NodeBB decide which order to override templates? I'm trying to override the
homepage.tpl
plugin fromnodebb-plugin-custom-homepage
in a theme, but it doesn't seem to be working correctly. Is this because plugins take preference over themes?If so, is there a way to manually override templates programmatically?
-
@baris It seems you can't change the order of themes from that interface.
Is there a way of directly overriding the template manually?
Here's how everything is set up:
nodebb-plugin-custom-homepage
has the original homepage templatenodebb-theme-blah
has the template I want to use on the homepage
It has a special widget area that I need. I don't want to completely replace the template file, but it looks like I may have to, or at least copy the file into the compiled templates directory onapp.load
-
Yeah that's how @psychobunny does it in some of his plugins. There isn't a more elegant way right now as far as I know, the loading order determines the template used but you can't arrange the themes in that list so maybe that's what we should add.
-
Is this possible with v2 now?
I'd like to overwrite the template of a plugin with my custom theme but do not know how to overwrite the template files