How fetch list of element sort by filesize

Author Message

Gianfranco Forlino

Thursday 31 January 2008 9:09:29 am

Hi,
i have a class <b>software</b> with an element <b>filedownload</b> as FILE. How can fetch the list of elements, filtering content on datatype attribute <b>filesize</b> or <b>download_count</b> ?

Best regards

André R.

Thursday 31 January 2008 9:48:24 am

You can filter / sort by download count using a extended attribute filter. the data is in the ezbinaryfile table. Filesize on the other hand is not in the table so you'll probably have to create a new datatype that extends ezbinaryfile to be able to sort by / filter by size.

Search for 'filter' on this site or ezpedia, or:
http://www.google.com/search?hl=en&client=opera&rls=en&hs=gpI&q=Extended+attribute+filter+ez&btnG=Search

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Gianfranco Forlino

Friday 01 February 2008 7:12:59 am

Too complicated. You have an example from which to take inspiration? I saw the example images on valid but I was not much help

Many thanks

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 19:06:33
Script start
Timing: Jan 18 2025 19:06:33
Module start 'layout'
Timing: Jan 18 2025 19:06:33
Module start 'content'
Timing: Jan 18 2025 19:06:33
Module end 'content'
Timing: Jan 18 2025 19:06:33
Script end

Main resources:

Total runtime0.0402 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.0122 589.1641152.6406
Module start 'layout' 0.01220.0045 741.804739.4766
Module start 'content' 0.01670.0200 781.281389.3672
Module end 'content' 0.03680.0034 870.648434.3047
Script end 0.0402  904.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00379.2261140.0003
Check MTime0.00133.1797140.0001
Mysql Total
Database connection0.00297.221110.0029
Mysqli_queries0.006014.818530.0020
Looping result0.00000.072310.0000
Template Total0.00307.310.0030
Template load0.00174.221010.0017
Template processing0.00123.094910.0012
Override
Cache load0.00133.348610.0013
General
dbfile0.00389.360680.0005
String conversion0.00000.035640.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