File's size indication

Author Message

Franck T.

Friday 14 April 2006 6:35:42 am

Hello.
May be a silly question but is there a way to remove the size indication in files' view line.
With the classic template:

<div class="attribute-file">
        <p>{attribute_view_gui attribute=$node.object.data_map.file icon_size='small' icon_title=$node.name}</p>
    </div>

I get the text link + the size but no icon ???
Thanks.

Ashley Knowles

Monday 17 April 2006 8:20:19 pm

I'd also be interested in this, as I wish to change the line to say "Download <file size>"

Ɓukasz Serwatka

Monday 17 April 2006 11:41:48 pm

@Franck

By default icon is not displayed, use code below to display it:

{attribute_view_gui attribute=$node.object.data_map.file icon_size='small' icon_title=$node.name icon='yes'}

@Ashley
You can override standard templates for

design/standard/templates/content/datatype/view/ezbinaryfile_direct.tpl
design/standard/templates/content/datatype/view/ezbinaryfile.tpl

You can copy this files to your design dir like

design/(yourdesign)/templates/content/datatype/view/ezbinaryfile_direct.tpl
design/(yourdesign)/templates/content/datatype/view/ezbinaryfile.tpl

or use override system from admin. Then just change template as you need.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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

Main resources:

Total runtime0.0144 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.0044 589.3359152.6250
Module start 'layout' 0.00440.0021 741.960939.4453
Module start 'content' 0.00650.0054 781.406389.4297
Module end 'content' 0.01190.0025 870.835934.3047
Script end 0.0144  905.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002316.2203140.0002
Check MTime0.00107.1091140.0001
Mysql Total
Database connection0.00064.139810.0006
Mysqli_queries0.002114.256230.0007
Looping result0.00000.069410.0000
Template Total0.001812.110.0018
Template load0.00096.351910.0009
Template processing0.00085.755110.0008
Override
Cache load0.00064.430810.0006
General
dbfile0.00031.735980.0000
String conversion0.00000.047940.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