Direkten Link zu einer Datei (Download) erstellen

12.03.2012 | eZ Publish

You have to do to embed your file inside xml block of your article as a object and select view "embed-inline" then you make a override rule in your override.ini file:


[file-embed-inline]
Source=content/view/embed-inline.tpl
MatchFile=embed-inline/file.tpl
Subdir=templates
Match[class_identifier]=file

inside the template file_embed-inline.tpl put this link to the file:

 <a href={concat( 'content/download/', $object.data_map.file.contentobject_id, '/', $object.data_map.file.id,'/version/', $object.data_map.file.version , '/file/', $object.data_map.file.content.original_filename|urlencode )|ezurl}>
{$object.name|wash}</a>

Thanks to Daniele for posting this!