Friday 20 March 2009 7:16:33 am
Take a look at the node doc (you can click further on the ezcontentobject link for doc on object): http://ez.no/doc/ez_publish/technical_manual/4_0/reference/objects/ezcontentobjecttreenode but, be aware that several of the attributes of objects triggers sql calls* to get them, so the less dots '.', the better.
Meaning "$node.class_identifier" is generally better then "$node.object.class_identifier". And in stead of doing $node.object all over your code, define it as a $variable and re use that. * You can see this more or less in the doc, attributes that are marked as Static, 'No' needs extra work to return the value. For php $node.class_identifier will quite easily be:
$classIdentifier = $node->attribute('class_identifier');
All classes that extends eZPersistentObject supports this, actually attribute() and hasAttribute functions is a requirement to be able to use an object in templates.
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom
|