-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non basic template pathing? #320
Comments
I'm not sure what you mean - can you be more elaborate with a code example? We do expose the |
Something like... .send({
template: 'some/path/to/mars',
message: {
to: 'elon@spacex.com'
},
locals: {
name: 'Elon'
}
}) OR .send({
template: '../../some/path/to/mars',
message: {
to: 'elon@spacex.com'
},
locals: {
name: 'Elon'
}
}) How does it work? |
If you look in the codebase, the
|
Awesome dude! I'll take a look and possibly go the PR route 👍 Thanks for the quick reply! |
Actually @marcwhitbread - you might not even need a third argument! https://nodejs.org/api/path.html#path_path_isabsolute_path You could just use that inside the |
Going to re-open this- once we resolve/patch/PR we can close 😄! |
@marcwhitbread would love a PR ❤️ ! |
@niftylettuce Would that solve the issue? |
thanks @pke, I've released v5.0.1 of email-templates which includes this PR update docs are available too at https://github.com/niftylettuce/email-templates#absolute-path-to-templates cc @marcwhitbread care to try it out? |
Can I do something like template: 'content/some_key'? or '../content/some_key'?
The text was updated successfully, but these errors were encountered: