fetch(content,search) with sort_by by multiple attributes

Author Message

Marcin Drozd

Friday 01 September 2006 12:21:32 am

Hi
I have 9 classes: <b>C_1 (class_id=1)</b> , ... C_9 (class_id=9).
Let class C_i has some attributes <b>(a_i1, a_i2, ...)</b>
(C_1 -> a_11, a_12
C_2 -> a_21, a_22
etc.) and
<b>attribute_id of a_ij = ij</b> (ex. a_21 => attr_id=21)
(a_1j - name, text line; and a_2j - special category, text line or select)

I use fetch(content, search) with class_attribute_id as array, like:
{ ... class_attribute_id, array( a_11, a_21, ..., a_91 ) }
and it works (my post on http://ez.no/content/view/full/105218 )

But I want to use this fetch with sort_by too.
It works with { sort_by, array( 'name', false() ) }
but I hold out for this
{ sort_by, array( array( 'attribute', false(), ATTRIBUTE_IDs ) ) }
where ATTRIBUTE_IDs = { a_12, a_22, ..., a_92 }
like this pseudo-code:
{ sort_by, array( array( 'attribute', false(), <b>array( a_12, a_22, ..., a_92 )</b> ) ) }

And I think it is not possible, right?

I can fetch all search-nodes, and sort manualy, but it is not smart
So, is another way to sort in fetch?
Thank you.

http://ez-publish.pl

Marcin Drozd

Tuesday 12 September 2006 3:16:11 am

What I did:
- fetch all nodes (content,search)
- sort by extra attributes (one for one class)
- fetch only 10 specific nodes (from all sorted) and build navigation
but it's too slow
Do U have a better idea?

http://ez-publish.pl

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

Main resources:

Total runtime0.0139 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.0048 588.3906151.2422
Module start 'layout' 0.00480.0022 739.632836.7109
Module start 'content' 0.00700.0054 776.343890.1094
Module end 'content' 0.01240.0015 866.453129.9922
Script end 0.0139  896.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002417.0500140.0002
Check MTime0.00117.6105140.0001
Mysql Total
Database connection0.00074.683810.0007
Mysqli_queries0.002014.657630.0007
Looping result0.00000.080510.0000
Template Total0.00118.110.0011
Template load0.00096.291910.0009
Template processing0.00021.751910.0002
Override
Cache load0.00064.331010.0006
General
dbfile0.00096.733780.0001
String conversion0.00000.044540.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.0002 secs