Fetching data from eZ, in php code

Fetching data from eZ, in php code

Saturday 16 July 2005 8:33:49 pm - 4 replies

Author Message

Bruce Morrison

Saturday 16 July 2005 11:08:23 pm

Hi Johann

Use the eZ lib, it's heaps easier :)

eZContentObject::fetchByNodeID should do the trick. See:
http://pubsvn.ez.no/doxygen/classeZContentObject.html#a22

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

johann savalle

Sunday 17 July 2005 3:34:23 am

great :)

johann savalle

Sunday 17 July 2005 3:39:14 am

arg :(
I can't figure out how to access content attributes... I have play around with dataMap, fetchDataMap, read the doc, the code...
but nothing right is showing up...

any small exemple ? explanation ?

johann.

johann savalle

Sunday 17 July 2005 5:15:14 am

found !

must use something like this :

     16 $node =  & eZContentObject::fetchByNodeID  (       $nodeid,
     17                 $asObject = true
     18         ) ;
     19 $data = $node->dataMap();
     20
     21 while( ( $key = key( $data ) ) !== null )
     22 {
     23         $text .= $data[$key]->content();
     24         next($data);
     25 }

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.