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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.