I can easier and cleaner create and maintain templates for e.g. (html) mails
Storypoints:
?
Acceptance criteria:
[ ] templates stored under e.g. api/src/templates/mail/ can be rendered
[ ] variables can be passed to the value
[ ] object-values from a passed value can be accessed (nested)
[ ] a wrapper template can be defined in the render-function (this may be useful to create a tempalte file for the message and a wrapper-file to define some kind of html markup stuff)
User Story
As a:
Programmer
I want:
to have a templating engine in the backend
so that:
I can easier and cleaner create and maintain templates for e.g. (html) mails
Storypoints:
?
Acceptance criteria:
api/src/templates/mail/
can be renderedrender
-function (this may be useful to create a tempalte file for the message and a wrapper-file to define some kind of html markup stuff)Additional info:
The module
mini-template-engine
looks pretty good for this task.Some kind of example code may be this:
but instead of getting the content from the variables we should read them from the template-files.