Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to specify template path in Web content Free marker templates?
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?
How do we achieve same in 7.2 for free marker templates? We want to place all our web content templates in a theme?
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/>
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™