Skip to content

Instantly share code, notes, and snippets.

@d80wrk
d80wrk / using-templates-in-adt.ftl
Created May 6, 2021 21:10 — forked from gonzalezalo/using-templates-in-adt.ftl
Using Liferay WebContent Template from ADT - Liferay 7
<#-- Liferay info on templates: https://dev.liferay.com/discover/portal/-/knowledge_base/7-0/designing-uniform-content -->
<#-- There is more than just a way of doing this: -->
<#-- Option 1 -->
<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
<#if entries?has_content>
<#list entries as curEntry>
<#assign article = curEntry.getAssetRenderer().getArticle() />
<#assign model = objectUtil("com.liferay.portal.kernel.portlet.PortletRequestModel", renderRequest, renderResponse) />