Forums / General / How to rebuild the path to the file download

How to rebuild the path to the file download

Author Message

Jean-François Sénéchal

Thursday 04 January 2007 4:38:15 am

Hello,

I fetch the files of a folder, and I want set the download URL at the file name
and not using {attribute_view_gui attribute=$taxe.data_map.file}

I almost rebuilt the URL, it misses the name of the file
How can I recover it ? ($taxe.contentobject.file.original_filename ?)

Here is my code :

{def $taxes_count=fetch( 'content', 'list_count',
hash( 'parent_node_id', 450,
'class_filter_type', 'include',
'class_filter_array', array( 'file' ) ) )}

{def $taxes=fetch( 'content', 'list',
hash( 'parent_node_id', 450,
'class_filter_type', 'include',
'class_filter_array', array( 'file' ) ) )}
<ul>
{foreach $taxes as $taxe}
<li>
<a href={concat("content/download/",$taxe.contentobject_id,"/",$taxe.data_map.file.id,"/file/",$taxe.contentobject.file)|ezurl}>{$taxe.name|wash(xhtml)}</a>
</li>
{/foreach}
</ul>

Thanks

L'informaticien est comme un petit canard:
il est calme en surface mais en dessous il brasse beaucoup d'eau pour
avancer ...!