Some functions on this portal require JavaScript but your browser does not support it or it has been disabled.
Skip to main content
Monday 10 July 2006 10:15:59 am - 2 replies
Modified on Monday 10 July 2006 10:16:32 am by Andrew K
Ćukasz Serwatka
Monday 17 July 2006 11:19:41 pm
Hi Andrew,
In form where you triggering new action you need to define ContentObjectID hidden input form. Then in your PHP code you can fetch object and access contentobject attributes.
include_once ('lib/ezutils/classes/ezfunctionhandler.php'); // {def $object=fetch( 'content', 'object', hash( 'object_id', 2 ) )} $object = eZFunctionHandler::execute( 'content','object', array( 'object_id' => $http->postVariable("ContentObjectID")) ); // {$object.data_map} $dataMap =& $object->dataMap(); // {$object.data_map.body.content.output.output_text} $body =& $dataMap['body']->content(); $bodyOutput =& $body->attribute('output'); $bodyOutputText = $bodyOutput->attribute('output_text');
Some more information:http://ez.no/community/forum/developer/defining_methods_or_custom_actions_for_content_classes/re_defining_methods_or_custo
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Andrew K
Tuesday 18 July 2006 7:00:26 am
Yup. That's what I'm looking for!Thanks.
--Andrew
You must be logged in to post messages in this topic!