-
Type:
Technical Task
-
Status: Closed
-
Resolution: Completed
-
Affects Version/s: 7.0.0 Alpha 1
-
Fix Version/s: 7.0.0 Alpha 2
-
Component/s: Portal Services, Portal Services > Templates Engine
-
Labels:None
-
Git Pull Request:
Currently the Liferay Template engine can handle only one Soy template. For a more extensive use of soy templates in portlet development a support for multiple template needs to be added.
Proposed implementation is:
Change the AbstractTemplate that it instead of a one TemplateResource has a list of them.
The change can be done so that the original interface is going to be kept and additional method will be added to handle the multi TemplateResource use case.
By default the AbstractTemplate also handles caching but I would push this down to soy template and cache the SoyTofu object.
In the SoyTemplate the main think to do is to change the
com.liferay.portal.template.soy.SoyTemplate.TemplatePrivilegedExceptionAction#run method to loop over the resources and add them.