Forums / Setup & design / getting rid of a filesize print-out
Stefan van Zwoll
Thursday 08 January 2004 2:43:43 pm
hello,
using ezp3.2-3, i do have a download-section in my project. i print out the link for the direct download of a specific file, i use the following code:
{attribute_view_gui attribute=$node.object.data_map.file}
everything works out fine, but ezp for some reason prints out after the link the file size of that file.how do i stop ezp from doing that? and with what code do i print out the filesize of that file (i might use that somewhere else on the page)?
thank you very much for your help.stefan
Balazs Halasy
Friday 09 January 2004 1:03:23 am
When using attribute_view_gui, you're calling up the template for the datatype that is used to represent some data within the content object that you're accessing. In this case, the system is probably accessing the view template for the ezbinaryfile datatype. This template is located here:
/design/standard/template/class/datatype/view/ezbinaryfile.tpl
You should make your own ezbinaryfile.tpl and place it inside your design (simply copy the one from the standard design and remove the printout of the size);
/design/my_design/template/class/datatype/view/ezbinaryfile.tpl
The ezbinaryfile.tpl includes the code which demonstrates how to print out the filesize.
Cheers!
Balazs
Friday 09 January 2004 4:16:14 am
hello balazs,
thank you for your help. the location of the tpl-file is
design/standard/templates/content/datatype/view/ezbinaryfile.tpl
though. looking forward to launch my site soon :-)...
sincerely, stefan
ps: for the direct link, i guess to use the ezbinaryfile_direct.tpl in the same location.
Friday 09 January 2004 5:38:00 am
Ah, sorry - typo; I see it now.. my bad.. but at least you were able to find the correct one! :-)