Forums / Developer / Getting Attribute Content

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Getting Attribute Content

Author Message

Björn X

Thursday 24 April 2003 4:34:05 am

Unfortunatelly
$contentObject->attributes();
is returning an array and not an array of objects of contentobjectattributes
Where is my failure?
How can i get the content?

$contentObject = eZContentObject::fetch( 269 );
var_dump($contentObject);
$attributes =& $contentObject->attributes();
var_dump($attributes);
// Loop each attribute
foreach ( $attributes as $attribute )
{
print( "Content : " . $attribute->content() );
}

thx Björn

Bård Farstad

Thursday 24 April 2003 4:42:44 am

Try the function contentObjectAttributes.

$attributes =& $object->contentObjectAttributes();

Or you can use the dataMap() function which will create an associative array with the attributes hashed by name.

$dataMap =& $object->dataMap();

$title = $dataMap['title'];

--bård

Documentation: http://ez.no/doc