Forums / Developer / Add object_relation attribute type within a php script / Comment46243
*- pike
Sunday 29 October 2006 7:54:10 am
nice thread
ofcourse, to use eZObjectRelationListType::appendObject you need to have included /kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php somewhere.
it seems rare to include that file directly. more often, people seem to include
include_once( 'kernel/classes/ezdatatype.php' );
and do something like
eZDataType::loadAndRegisterAllTypes();
which includes ezobjectrelationlisttype.php if it is a valid type.
$2c,*pike
PS. the print_r output of Fabio Carissimi seems ok. The object get's included in $content['relation_list'][0]['object'] by the appendObject call.
--------------- The class eZContentObjectTreeNode does.