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 ...!

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

eZ debug

Timing: Jan 31 2025 04:20:40
Script start
Timing: Jan 31 2025 04:20:40
Module start 'layout'
Timing: Jan 31 2025 04:20:40
Module start 'content'
Timing: Jan 31 2025 04:20:40
Module end 'content'
Timing: Jan 31 2025 04:20:40
Script end

Main resources:

Total runtime0.0245 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.2578151.2266
Module start 'layout' 0.00740.0031 739.484436.6797
Module start 'content' 0.01050.0125 776.164190.0469
Module end 'content' 0.02290.0015 866.210929.9922
Script end 0.0245  896.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00249.9699140.0002
Check MTime0.00124.8395140.0001
Mysql Total
Database connection0.00145.616610.0014
Mysqli_queries0.003112.841930.0010
Looping result0.00000.061310.0000
Template Total0.00103.910.0010
Template load0.00083.112210.0008
Template processing0.00020.779010.0002
Override
Cache load0.00052.149410.0005
General
dbfile0.003614.777380.0005
String conversion0.00000.028240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs