←Liferay 7: come embeddare un web content by title
06/02/17 14.31
Ciao a tutti! Avete la necessità di embeddare in Liferay 7 un web content tramite il titolo?
Di seguito i passaggi che embeddano nel portal normal il web content dal titolo "social".
1. init-custom.vm
<#assign social = themeDisplay.getThemeSetting("social-title") />
2. portal_normal.vm
<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
<#assign article-social = journalArticleLocalService.getArticleByUrlTitle(group_id, "social")>
<div>
${journalArticleLocalService.getArticleContent(article-social, article-social.getDDMTemplateKey(), "VIEW", locale, themeDisplay)}
</div>
3. liferay-look-and-feel.xml
<settings> <setting configurable="true" key="social-title” type="text" value="" /> </settings>