Acess to content/download for a file in media tab

Author Message

Valenti salas

Thursday 16 December 2004 4:29:12 pm

Hi,

In my own class PDF I have the title and file. On the template I would like to link the name to open file. To do this I have used the code below:

href={concat("http://mysite.com/index.php/admin/content/download/",$object.main_node.contentobject_id,"/2437/file/",$object.main_node.data_map.fichero.content.original_filename)}

the 2437 number is the id of the class param.

the problem is that i need to point to admin directory to find the file, if not ez can't find the file that is in media tab.

Anyone knows why?

I've try to assign polices to anonymous to permit unlimited access to content module but if I'm not loggined in admin interface i can't access to the file download.

Heiner Wurbs

Friday 17 December 2004 3:51:52 am

Hi,

maybe this will work (removing the domain and siteaccess and the idea 2437):
href={concat("content/download/",$object.main_node.contentobject_id,"/",$object.main_node.data_map.fichero.id,"/file/",$object.main_node.data_map.fichero.content.original_filename)}

regards,
heiner

Valenti salas

Sunday 19 December 2004 6:04:11 am

Thanks, but it is wrong yet.

the code you've got me put after the siteaccess name the path where is the node but the file is in media tab. Ez say 'module not found'.

I have tryed different modifications in the url but the only that goes ok is using the admin_siteacces in the url.

Any suggestions?

many thanks.

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 19 2025 04:53:22
Script start
Timing: Jan 19 2025 04:53:22
Module start 'layout'
Timing: Jan 19 2025 04:53:23
Module start 'content'
Timing: Jan 19 2025 04:53:23
Module end 'content'
Timing: Jan 19 2025 04:53:23
Script end

Main resources:

Total runtime0.0179 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.0061 589.3047152.6406
Module start 'layout' 0.00610.0031 741.945339.4766
Module start 'content' 0.00930.0064 781.421989.2578
Module end 'content' 0.01570.0022 870.679730.3047
Script end 0.0179  900.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002715.2806140.0002
Check MTime0.00126.9737140.0001
Mysql Total
Database connection0.00095.297110.0009
Mysqli_queries0.002916.318530.0010
Looping result0.00000.083810.0000
Template Total0.001810.210.0018
Template load0.00105.687010.0010
Template processing0.00084.464210.0008
Override
Cache load0.00074.069010.0007
General
dbfile0.002111.773280.0003
String conversion0.00000.055940.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