Author Topic

Paul Leclercq

Friday 07 December 2007 10:30:49 am

Comment48826

Hello Bayron,

It isn't possible to use attribute_filters for fetch 'lists' of ObjectRelationLists:
http://ez.no/developer/forum/setup_design/objectrelationlist_and_attribute_filter

So if you have more than one object related to your object then you will need to find another solution:

That way you can maybe try using an operator and use this function:
http://pubsvn.ez.no/doxygen/trunk/html/classeZContentObjectTreeNode.html

 $node_array =& eZContentObjectTreeNode::subTree(
        array( 'Depth' => 1,
               'Limit'            => 50,
               'Offset'           => 0,
               'SortBy'           => array( 'published', 1 ),
               'DepthOperator'    => 'eq',
               'ClassFilterType'  => 'include',
               'ClassFilterArray' =>  array('comment')
               ), $nodeID );

Function which works in a similar way as fetch('content', 'list' ....
You can then try and filter your results related attributes or order them using classic php functions.