Forums / Developer / Extract values of a datatype

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