Monday 13 June 2011 1:28:50 pm
You can use the attribute() method like this:
$object->attribute('id'); You will be able to get all the proprties that you can get in the template. You can also concatenate the attribute operator. For example, this. $object.main_node.node_id
would in PHP be:
$object->attribute('main_node')->attribute('node_id') This is valid for all eZP objects. For getting the attributes you need: $object->attribute('data_map')
And this will give you an associative array of object's attributes, attribute identifiers will be the keys in array. As for getting the currently displayed content ojbect, it really depens on where you wan't to use this function. Try looking at the docs.
--
Nothing is impossible. Not if you can imagine it!
Hubert Farnsworth
|