Tuesday 29 May 2007 4:42:48 am
Dear all, I'm trying to fetch children of a node filtered by their objects in relation.
Example :
Object to fetch is in relation with 2 other objects by the "object relations" datatype.
Object to fetch -> datatype object relation -> 1. Object ( id = 162 ) -> 2. Object ( id = 160 ) To get the objects which have a relation with object id = 162, I've tried this code :
{def $children=fetch( 'content', 'list', hash( 'parent_node_id', 166,
'sort_by', array( 'name', true() ),
'limit', $number_of_items,
'offset', $view_parameters.offset
'attribute_filter', array( array( 'user/agence',
'=',
162 ) )
) )}
"agence" is the attribute relation of my user class. Using this code doesn't return any objects.
I've based my code on the example 11 in the fetch documentation : http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list Any ideas ? Thx Rom.
--
Romain Dausset
rdausset@facileit.com
http://www.facileit.com
|