Fetch reverse related objects and sort_by attribute

Fetch reverse related objects and sort_by attribute

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

Author Message

Andreas Kaiser

Tuesday 23 January 2007 12: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:

http://ez.no/community/forum/general/object_relations

Perhaps this contribution helps:

http://ez.no/community/contribs/datatypes/enhanced_objectrelation

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

Ulrich L.

Wednesday 24 January 2007 6:35:31 am

Thanks.

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?

Xavier Dutoit

Wednesday 24 January 2007 11:54:14 pm

Hi,

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())}

X+

http://www.sydesy.com

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

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