-
Notifications
You must be signed in to change notification settings - Fork 17
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
Include partials #13
Comments
Hi, we use fmpp under the hood, it seems |
Hi. I'm not sure I will be able to spend more time and provide a PR, but here my findings for future reference. I think the problem is simply with the random filenames being used, but it might also involve copying /providing files. This is how I was able to see the includes actually working: hard-coded external includes in the config object of var config = {
// ...
freemarkerLinks: `{
templates: C:/absolute-path/to/templates
}`
}; In that template folder I have foo.ftl and bar.ftl, with foo including bar via
With that, the include statements are evaluated just fine and I can preview the resulting template correctly. So the feature is indeed supported and available. My guess is that we would have to
I think that for now, I will try to solve the problem within the scope of my project, and in a rather specific way. If I come up with something useful, I'll see if it can be integrated at the level of this library. |
Hi. We're using your library to preview html email templates. A small stack that we feed with some json data and out comes the html email in a browser. This works great.
However, a new requirement came up and we have to actually include partials in various templates.
The way I see it, when we put a
<#include "foo.ftl">
in a template, it simply remains exactly that string - it doesn't get evaluated and the contents of foo.tpl don't get included.Effectively, we can preview each partial on its own, but we can not preview the composed email template.
Without going into details - should this be possible, and we just need to setup our stack better? Or is it maybe just not possible without using actual java freemarker?
The text was updated successfully, but these errors were encountered: