ze\file::contentLink()
ze\file::contentLink(&$url, $cID, $cType, $cVersion)
This function generates a link to download a file associated with a Content Item.
This function generates a link to download a file associated with a Content Item; for example a Document or a Picture.
Note that by calling this function you are granting the current Visitor or Extranet User the right to view/download the file. Links given to an Extranet User can only be used by someone logged in as that Extranet User, but links given to a Visitor who is not logged in can be used by anyone who knows the link.
&$url
The URL to download the file will be placed in this variable.
$cID
The Content Id of the Content Item.
$cType
The Content Type of the Content Item, e.g. document or picture.
$cVersion
The version of the Content Item.
Returns true or false, depending on whether a link was generated successfully. (An example of a case where a link might not be generated is if a file is missing from the docstore directory.)