RE: 7.2 RC3 - Velocity Dropped for WCD Templates

Lee Jordan, modified 6 Years ago. Expert Posts: 449 Join Date: 5/26/15 Recent Posts
It looks like velocity has been dropped for web content templates. How does this play out in an upgrade situation?
thumbnail
Arun Das, modified 6 Years ago. Regular Member Posts: 166 Join Date: 7/23/12 Recent Posts
Hi,
You will have to convert your velocity templates to Freemarker. I believe, velocity templates were deprecated in 7.0.

Arun
thumbnail
Jorge Ferrer, modified 6 Years ago. Liferay Legend Posts: 2871 Join Date: 8/31/06 Recent Posts
Hey Lee,
The option to create new Velocity templates is not offered out of the box for web content templates to avoid forcing template authors to choose, which creates additional complexity. Our recommendation nowadays is to use freemarker, but we of course still support those who have their templates written in Velocity.
To enable this as an option, go to System Settings > Web Content > Administration and add as a value for the field "Template Language Types" (See screenshot). Note that this is only necessary to create new templates. Existing ones should already be working.
BTW, Are you guys currently using only Velocity for the Web Content templates? Is there any particular reason why you chose it over Freemarker?
Lee Jordan, modified 6 Years ago. Expert Posts: 449 Join Date: 5/26/15 Recent Posts
Ok thank you, good to know they won't stop working at upgrade. Yes 3 years ago the templates were written, there really wasn't anything at the time in the way of making a big deal about velocity being deprecated in 7.0. Plus we were trying to scrape enough code blocks together to author the templates with basically no official documentation and all the community messages and code samples available online were for velocity. We really need better developer support for the move to freemarker.