//~OPTIONS
{
  clientRendering:  true,
  lockTemplate:     false,
  autoUpdate:       true,
}

//~ARGUMENTS
{
  value:       undefined,
}

//~TEMPLATE
%{{
  var filePath = args.value && args.value.file && typeof args.value.file === "object" && args.value.file.name ? args.value.file.name :
                 args.value && args.value.file && typeof args.value.file === "object" && args.value.file.path ? args.value.file.path :
                 args.value && typeof args.value.file === "string"                                            ? args.value.file :
                                                                                                                null;
  var directory = args.directory ? args.directory+"/" : "@path:files/";
  var fileLink = filePath ? fcf.getPath(filePath.indexOf("/")!=-1 ? filePath : directory + filePath, false) : null;
}}%
@{{ fileLink ? "<a href='" + fileLink + "' target='_blank'>" + fileLink + "</a>" : ""}}@
