Share » Forums » General » How to realise downloadlink

How to realise downloadlink

How to realise downloadlink

Wednesday 25 February 2009 1:56:25 am - 6 replies

Modified on Wednesday 25 February 2009 1:56:54 am by Oliver Dzierzon

Author Message

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

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu