I'm uploading files via dynamic data list Document
field. Now I would like to allow anonymous users to download those files, but currently they see only file name without the link to file:
Do you have any suggestions about how can I achieve that?
Edit:
As @Mark suggested, I've created Display Templated and in freemarker editor I've selected Display and Media
field. It generated following code in my .ftl file:
<a href="${ddmUtil.getDisplayFieldValue(themeDisplay, cur_record.getFieldValue("Documents_and_Media1422", locale), cur_record.getFieldType("Documents_and_Media1422"))}">
${languageUtil.format(locale, "download-x", "Documents and Media")}
</a>
I've saved changes and refreshed page. It gave me following error:
Expression cur_record is undefined on line 9, column 3 in 10157#10197#16569.
Shouldn't cur_record be populated by the liferay?