Asset Publisher - Download Links for Documents
Asset Publisher - Download Links for Documents Problem : we need to make Documents and Media documents downloadable by clicking the link from Asset Publisher (using custom widget template). Solution : use a code snippet below: <#list entries as entry > <#assign entryURL = " ${ entry . getViewURL () } " /> <#if entry . getAssetRendererURLDownload () ?? > <#assign entryURL = " ${ entry . getAssetRendererURLDownload () } " /> </#if> <#-- ... --> < a href =" ${ entryURL } " > ${ entry . title } </ a > <#-- ... --> </#list> Explanation: the View URL entry . getViewURL () is an asset link, which is a preview link by default. If we need a download URL - we can retrieve it from the Asset Renderer using entry . getAssetRendererU...