Created
December 6, 2019 19:30
-
-
Save natecavanaugh/6c876bf978df35e49a7f46b093490507 to your computer and use it in GitHub Desktop.
This file contains 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
<#assign dlFileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")/> | |
<#if entries?has_content> | |
<#list entries as entry> | |
<#assign assetRenderer = entry.getAssetRenderer()> | |
<#assign title = htmlUtil.escape(assetRenderer.getTitle(locale))> | |
<#if assetRenderer.getType() == "document"> | |
<#assign fileEntryId = assetRenderer.getClassPK()> | |
<#assign fileEntry = dlFileEntryService.getFileEntry(fileEntryId)> | |
<#assign version = fileEntry.getLatestFileVersion(false)> | |
<#assign viewURL = themeDisplay.getPortalURL() + themeDisplay.getPathContext() + "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + httpUtil.encodeURL(htmlUtil.unescape(fileEntry.getTitle())) + "/" + fileEntry.getUuid() + "?version=" + version.getVersion()> | |
<#if version.getSize() == 0> | |
No file uploaded | |
</#if> | |
</#if> | |
</#list> | |
</#if> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment