eZ Community » Forums » Developer » Sort_by an attribute

Sort_by an attribute

Sort_by an attribute

Friday 20 July 2012 4:00:55 pm - 2 replies

Hi Everyone ,

I am Trying to sort my fetched nodes by one of the my attribute which is called "date_of_arrival" but it is not working and i have to do it with Publish date as below which is not nice at all !

    {def $doffers=fetch( 'content', 'reverse_related_objects', hash( 'object_id', $cat.object.id,
                'all_relations', true(),
                'group_by_attribute', true(), 
                'sort_by', array( 'published', true())

Thanks in Advance

Modified on Friday 20 July 2012 4:05:06 pm by Amir Koklan

Friday 20 July 2012 5:30:42 pm

You should try something like this:

 'sort_by', array( 'attribute', false(), 'your_class_identifier/date_of_arrival' )

here's a good start here

Monday 23 July 2012 11:13:32 am

Thanks Ousmane , 


I had already tried this way and it did not work but I double check and the same thing happened 

I don't why this way it's not working !


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from