Skip to content

Instantly share code, notes, and snippets.

@evaldeslacasa
Created February 27, 2024 16:26
Show Gist options
  • Save evaldeslacasa/07ebb93bd5c4b9305105a79cf3108292 to your computer and use it in GitHub Desktop.
Save evaldeslacasa/07ebb93bd5c4b9305105a79cf3108292 to your computer and use it in GitHub Desktop.
Get file entry data in Freemarker
<#assign image_info = jsonFactoryUtil.looseSerializeDeep(Image)?eval >
<code>${(image_info.attributes.alt)!}</code>
<#assign fileEntryId = (image_info.attributes.fileEntryId?number)! >
<#if fileEntryId?has_content >
<#assign fileEntry = _dlfels.getFileEntry(fileEntryId)>
<#assign file_entry_info = jsonFactoryUtil.looseSerializeDeep(fileEntry) >
<code>${file_entry_info}</code>
</#if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment