Forums / Setup & design / Sort search result

Sort search result

Author Message

Guyvarch Sebastien

Tuesday 19 July 2005 1:47:44 am

Hi all,

I would like to sort my search result according to the name of one attribute..
Is it possible and how can I do that?

Thx

Ɓukasz Serwatka

Friday 22 July 2005 1:14:50 am

Hi,

Attribute sorting can only be used if the returned collection contains the same type of nodes.

{def $search=fetch( 'content', 'search',
                    hash( 'text',     'example',
                          'class_id',  2,
                          'sort_by', array( 'my_class/my_attribute', false() ) ) )}

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