getting rid of a filesize print-out

Author Message

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

Stefan van Zwoll

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.

Balazs Halasy

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! :-)

Balazs

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 22:18:31
Script start
Timing: Jan 18 2025 22:18:31
Module start 'layout'
Timing: Jan 18 2025 22:18:31
Module start 'content'
Timing: Jan 18 2025 22:18:32
Module end 'content'
Timing: Jan 18 2025 22:18:32
Script end

Main resources:

Total runtime0.8683 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.1641152.6406
Module start 'layout' 0.00520.0025 741.804739.4609
Module start 'content' 0.00770.8590 781.2656514.2734
Module end 'content' 0.86680.0015 1,295.539112.1563
Script end 0.8683  1,307.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3561160.0002
Check MTime0.00130.1489160.0001
Mysql Total
Database connection0.00070.079610.0007
Mysqli_queries0.805692.7730600.0134
Looping result0.00080.0911580.0000
Template Total0.821594.620.4108
Template load0.00200.228520.0010
Template processing0.819594.378020.4098
Template load and register function0.00020.018510.0002
states
state_id_array0.00110.129910.0011
state_identifier_array0.00080.094720.0004
Override
Cache load0.00160.1803300.0001
Sytem overhead
Fetch class attribute can translate value0.00110.126720.0006
Fetch class attribute name0.00120.140350.0002
XML
Image XML parsing0.00160.179020.0008
class_abstraction
Instantiating content class attribute0.00000.001960.0000
General
dbfile0.00750.8585160.0005
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs