Is there a way to modify email templates on files like TPL?
-
I know that you can modify email templates in the nodebb admin screen, but I was wondering if there are some templates that I can write on a file, like TPL templates or something like that, so I can track email template file updates, and to avoid having the email template in the database.
-
@sebastián-cisneros yes, the templates themselves are found in
src/views/email
which you can extend from within a theme.Keep in mind you'll need to reset any overrides you've saved in the ACP before any new email templates will show
-
@julian Thanks for the help, this is exactly what I was looking for. One more question tho. Where should I place the custom email tpl files?
custom-theme-folder/templates
there? like
custom-theme-folder/templates/emails
or
custom-theme-folder/views/emails
or
custom-theme-folder/templates/views/emails
or other?
-
You can set the templates directory to anything in plugin.json, I think it defaults to just
templates
if you don't specify.Them you match the path from views, so it would be
templates/emails
where you put them.