Extract values of a datatype

Author Message

Albe Terra

Wednesday 08 October 2008 6:10:39 am

Hi!
I need to extract the values of the datatype "file". In particular i need the filepath and filesize.
How can I do this?

I have tried to use this code but it doesn't work:

{attribute_view_gui attribute=$node.data_map.file.filepath}

Thanks! Albe

Ivo Lukac

Wednesday 08 October 2008 6:42:19 am

Hello Albe,

I presume you need link to file:

{concat("content/download/",$node.data_map.file.contentobject_id,"/",$node.data_map.file.id,"/file/",$node.data_map.file.content.original_filename)|ezurl}
 

and file size:

{$node.data_map.file.content.filesize|si(byte)}
 

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Albe Terra

Wednesday 08 October 2008 7:53:54 am

Thank you! Great!

Albe

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 18 2025 16:14:21
Script start
Timing: Jan 18 2025 16:14:21
Module start 'layout'
Timing: Jan 18 2025 16:14:21
Module start 'content'
Timing: Jan 18 2025 16:14:21
Module end 'content'
Timing: Jan 18 2025 16:14:21
Script end

Main resources:

Total runtime0.0123 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.0042 589.5000152.6250
Module start 'layout' 0.00420.0022 742.125039.4453
Module start 'content' 0.00640.0037 781.570389.4453
Module end 'content' 0.01020.0021 871.015630.3047
Script end 0.0123  901.3203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002218.0436140.0002
Check MTime0.00108.4457140.0001
Mysql Total
Database connection0.00065.093310.0006
Mysqli_queries0.002015.985030.0007
Looping result0.00000.079410.0000
Template Total0.001713.910.0017
Template load0.00086.540010.0008
Template processing0.00097.328210.0009
Override
Cache load0.00054.452310.0005
General
dbfile0.00021.642380.0000
String conversion0.00000.048440.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