Details
-
Improvement
-
Resolution: Fixed
-
Medium
-
3.8.8, 3.9.2
-
None
Description
The following patch allows usage of eZObjectRelationList fields in the content object name
--- ezpublish-3.9.2/kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php 2007-05-04 13:33:29.000000000 +0200 +++ www/ezpublish-3.9.2/kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php 2007-05-19 11:48:33.000000000 +0200 @@ -1454,13 +1454,27 @@ } /*! - Returns the content of the string for use as a title + Returns the content of the string for use as a title, + for simplicity this is the name of the first object referenced or false. */ function title( &$contentObjectAttribute ) { - return false; + $objectAttributeContent = $this->objectAttributeContent($contentObjectAttribute); + + if (count($objectAttributeContent['relation_list'])>0) + { + $target=$objectAttributeContent['relation_list'][0]; + $targetObject =& eZContentObject::fetch( $target['contentobject_id'] ); + return $targetObject->Name; + } + else + { + return false; + } } + + /*! \reimp */