This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Setup & design » Fetch reverse related objects and...

Fetch reverse related objects and sort_by attribute

Fetch reverse related objects and sort_by attribute

Monday 22 January 2007 11:58:05 pm - 3 replies

as the documentation states: when using "fetch(content, reverse_related_objects...)" it is not possible to perform sort_by with the attribute parameter, as it is possible with "fetch(content, list, ...)"
This is really a pity! Does anybody have a good suggestion how to use "fetch(content, reverse_related_objects...)" AND to perform sorting by attribute in a different way?
I really need this...


eZ 3.8.5

Tuesday 23 January 2007 9:07:30 pm

I have some problems getting inside a template the nice url to a "related object" - and looking around I found these:

Perhaps these posts help you out:

Perhaps this contribution helps:

Wednesday 24 January 2007 3:35:31 pm


I don't intend to join EOR since eZpublish manages to cover pretty much of that functionality out of the box today.

The forum thread is interesting. In the middle of it somebody explains that for sorting he creates a sort function, written in PHP and located in index.php.
Is this the only way to go for me, too?

Thursday 25 January 2007 8:54:14 am


I suggest to create a custom sort template function (that could be used to sort any node/object table).

Eg :

{$unsorted_objects = fetch(content, reverse_related_objects...)
$sorted = {$unsorted|sort('your_attribute',true())}



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

36 542 Users on board!

Forums menu

Proudly Developed with from