AnsweredAssumed Answered

using custom soy templates in freemarker

Question asked by bergerle on Feb 26, 2014
Latest reply on Feb 27, 2014 by bergerle

Hi all!

 

I just encountered a weird problem with soy templates in Freemarker. Apparently, if I use <@resource.template file="..." /> to include a soy template, it looks for that filepath inside the WEB-INF/classes directory. I had a look into the jive core and noticed, that it does work with a path that includes the absolute pluginDir path and also with paths that start with "/plugins" and have a ".js" suffix. I tried both and both worked fine, but with the absolute path I get the problem that I don't know how to get it dynamically (so it works on different installations). Changing the suffix to ".js" worked fine, but just looks awefully wrong. There got to be a better way, right? Has anyone encountered (and maybe solved) the same problem?

Outcomes