Last active
April 20, 2020 23:49
-
-
Save jverweijL/1e0a3138c840360a342b954d27b1c5d3 to your computer and use it in GitHub Desktop.
ADT's and Freemarker examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <#-- https://gist.github.com/jverweijL/67b929d11465058654aacc48d6574c9b --> | |
| <#if entries?has_content> | |
| <#list entries as curEntry> | |
| <#assign priority=curEntry.getPriority() > | |
| <div class="float-left"> | |
| <a href="">${curEntry.getTitle(locale)}</a> | |
| </div> | |
| <div class="float-right"> | |
| <#if priority gt 0> | |
| <svg class="lexicon-icon"> | |
| <use xlink:href="${themeDisplay.getPathThemeImages()}/lexicon/icons.svg#sticky" /> | |
| </svg> | |
| </#if> | |
| </div><br/> | |
| <div class="float-none"> | |
| ${curEntry.getSummary(locale)} | |
| </div><br/> | |
| </#list> | |
| </#if> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <#-- Control Panel -> Configuration -> System Settings -> Foundation -> FreeMarker Engine -> Restricted Variables. | |
| There you can remove serviceLocator from the list. You probably want to restart afterwards otherwise the setting won't work immediately.--> | |
| <#assign UserLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")> | |
| <#if entries?has_content> | |
| <ul class="timeline"> | |
| <#list entries as curEntry> | |
| <#assign user = UserLocalService.getUserById(curEntry.getUserId()) > | |
| <#assign priority=curEntry.getPriority() > | |
| <li class="timeline-item"> | |
| <div class="panel panel-secondary"> | |
| <a aria-controls="panelCollapse001" aria-expanded="false" class="collapsed panel-header panel-header-link bg-white p-0" data-toggle="collapse" href="#panelCollapse001" id="heading001" role="tab"> | |
| <div class="timeline-increment"> | |
| <div class="rounded-circle sticker sticker-xl"> | |
| <img alt="responsive circle image" class="img-fluid rounded-circle sticker sticker-xl border border-primary" src="${user.getPortraitURL(themeDisplay)}"/> | |
| </div> | |
| </div> | |
| </a> | |
| <div class="panel-body bg-white"> | |
| <#if priority gt 0> | |
| <svg class="lexicon-icon float-right"> | |
| <use xlink:href="${themeDisplay.getPathThemeImages()}/lexicon/icons.svg#sticky" /> | |
| </svg> | |
| </#if> | |
| <#assign renderer = curEntry.getAssetRenderer() /> | |
| <#assign journalArticle = renderer.getArticle() /> | |
| <@liferay_journal["journal-article"] | |
| articleId=journalArticle.getArticleId() | |
| ddmTemplateKey="GLOBAL.ITEM.POST" | |
| groupId=journalArticle.getGroupId() /> | |
| </div> | |
| </div> | |
| </li> | |
| </#list> | |
| </ul> | |
| </#if> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment