Sort on number of downloads?

Author Message

Daniel Guerrier

Wednesday 03 August 2005 6:29:12 pm

I have a content class with a file attribute.
I wanted to sort a fetch of of the objects on the number of times the file was downloaded. The doc says that sort doesn't support the file attribute, but I was hoping that there was a way to sort on the download number.

Thx

Daniel Guerrier

Thursday 04 August 2005 6:29:13 am

This has to be something that someone wanted to do in the past. What would be the point of keeping track of download if you can't do anything with it. Has anyone figured how to sort on #of downloads of a file that is an attribute of a content object?

Daniel Guerrier

Thursday 04 August 2005 2:10:03 pm

anyone?

David Eriksson

Friday 05 August 2005 12:35:05 am

The only way I can think of is to sort it yourself, either using your own template operator, or writing it in template language.

/David

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 21:18:14
Script start
Timing: Jan 18 2025 21:18:14
Module start 'layout'
Timing: Jan 18 2025 21:18:14
Module start 'content'
Timing: Jan 18 2025 21:18:15
Module end 'content'
Timing: Jan 18 2025 21:18:15
Script end

Main resources:

Total runtime1.1510 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.0049 589.0313152.6250
Module start 'layout' 0.00500.0023 741.656339.4453
Module start 'content' 0.00731.1420 781.1016502.2031
Module end 'content' 1.14930.0016 1,283.30478.1641
Script end 1.1510  1,291.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2959160.0002
Check MTime0.00140.1230160.0001
Mysql Total
Database connection0.00070.061210.0007
Mysqli_queries1.106296.1107600.0184
Looping result0.00080.0714580.0000
Template Total1.116297.020.5581
Template load0.00200.174920.0010
Template processing1.114296.802420.5571
Template load and register function0.00030.024610.0003
states
state_id_array0.00240.205010.0024
state_identifier_array0.00160.140620.0008
Override
Cache load0.00160.1417120.0001
Sytem overhead
Fetch class attribute can translate value0.00110.097620.0006
Fetch class attribute name0.00140.123140.0004
XML
Image XML parsing0.00020.018220.0001
class_abstraction
Instantiating content class attribute0.00010.005940.0000
General
dbfile0.00090.0773100.0001
String conversion0.00000.000640.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
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs