RE: How to specify template path in Web content Free marker templates?

thumbnail
Suresh Yadagiri, modified 6 Years ago. Junior Member Posts: 29 Join Date: 3/24/14 Recent Posts
In 6.x world we place all web content templates in a theme and then refer them in velocity web content template using #parse("my-templates-theme_SERVLET_CONTEXT_/templates/mytemplate.vm")
How do we achieve same in 7.2 for free marker templates?  We want to place all our web content templates in a theme?
thumbnail
Dominik Marks, modified 6 Years ago. Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts
I don't know if you can include web content templates like this, but we use a similar way to put all common freemarker macros into a file and deploy it using a theme. That way we can include those macros and use them in our own web content templates like this:

<#import "/my-templates-theme_SERVLET_CONTEXT_/common_macros.ftl" as common>
<@common.showImage imageUrl=src alt=alt/>