Forums / Setup & design / fetch(content,search) with sort_by by multiple attributes

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