Forums / Developer / Get attributes from related objects - php script
Romain Dausset
Friday 27 April 2007 6:01:52 am
Hi all,
I'm trying to get attributes from a related object.
For example 'id' or 'main_node_id' of my related objects.
I found this post which show how to set an object relation attribute.http://ez.no/community/forum/developer/add_object_relation_attribute_type_within_a_php_script
But I didn't succeded in my problem...
Any ideas ?
Thx,Rom.
-- Romain Dausset [email protected] http://www.facileit.com
Monday 30 April 2007 4:30:16 am
A solution :
// id de l'attribut relation$attributeID = 398;
$relatedObjects =& $object->relatedContentObjectList( false, false, $attributeID );
foreach( $relatedObjects as $relatedObject) { $userID = $relatedObject->attribute('id');}