How to realise downloadlink

Author Message

Oliver Dzierzon

Wednesday 25 February 2009 1:56:25 am

How can I realise an downloadlink to a object of the class "file" using eZ Publish 4.01?

content/view/download/<objid>

doesn't work

Thank you. ciao Olli

Yannick Komotir

Wednesday 25 February 2009 3:27:36 am

and

   {content_view_gui content_object=$object}
 

?

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

Oliver Dzierzon

Wednesday 25 February 2009 4:24:16 am

Thank you, but I do not realy know how to use it.

In my case i have a object "download_group" which hast attribute object relations to a some objects of the class "file".

First I go and fetch all related file objects

{def $relationlist =fetch('content','related_objects',
hash('object_id',$box.contentobject_id,'attribute_identifier',403 ))}

this works fine. And now, I want to loop the relationslist and each time output a downloadlink.

{foreach $relationlist as $relation}
{content_view_gui content_object=$relation.id view="download"}
{/foreach}

However there is no download output but also no error message.
Do I have to create my own download template? And how?

Thank you

Yannick Komotir

Wednesday 25 February 2009 5:04:07 am

don't write your own script, ez do that better

{foreach $relationlist as $relation}
 {node_view_gui content_node=$relation view="full"}
{/foreach}

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

Oliver Dzierzon

Wednesday 25 February 2009 5:19:53 am

It's great, thank you very much. Now it works fine.

I need much more experience using eZ publish.

ciao

Oliver Dzierzon

Wednesday 25 February 2009 5:29:15 am

It works fine but nevertheless I have a question:

How can I customize the download output?

The current output looks like:
<i>
Excel
Aktuelle Version
1
Name:
Excel
Description:
File:
Mappe.xls 13,50 kB
Tags:
</i>

but I want to create the following output:
<i>
<mime_type.icon> <file_name> <file_size>
</i>
thats all

ciao olli

Yannick Komotir

Wednesday 25 February 2009 6:57:10 am

create an override on the full view of file.tpl

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.