title: Downloading files that has been uploaded via dynamic data list in Liferay portal
body: <p><a href="https://stackoverflow.com/questions/21087339/uploading-files-to-liferay-server/21089309?noredirect=1#21089309">I'm uploading files</a> via dynamic data list <code>Document</code> 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:
  <img src="https://i.stack.imgur.com/Fg9Lq.png" alt="enter image description here"></p>
  
  <p>Do you have any suggestions about how can I achieve that?</p>
  
  <p>Edit:
  As @Mark suggested, I've created Display Templated and in freemarker editor I've selected <code>Display and Media</code> field. It generated following code in my .ftl file:</p>
  
  <pre><code>&lt;a href="${ddmUtil.getDisplayFieldValue(themeDisplay, cur_record.getFieldValue("Documents_and_Media1422", locale), cur_record.getFieldType("Documents_and_Media1422"))}"&gt;
  
  ${languageUtil.format(locale, "download-x", "Documents and Media")}
  
  &lt;/a&gt;
  </code></pre>
  
  <p>I've saved changes and refreshed page. It gave me following error:
  <code>Expression cur_record is undefined on line 9, column 3 in 10157#10197#16569.</code></p>
  
  <p>Shouldn't cur_record be populated by the liferay?</p>