eZ Community » Forums » Developer » zeta Components – eZ Publish interface
expandshrink

zeta Components – eZ Publish interface

zeta Components – eZ Publish interface

Monday 13 September 2010 2:32:21 pm - 4 replies

Hi Guys,

is there any possibility to fetch Nodes from eZ publish in zeta Components?

for example, I have two folders. the first folder contains the eZ publish installation and the second folder contains a file that tries to fetch nodes from eZ publish.

Modified on Monday 13 September 2010 2:35:01 pm by Phillip Casablancas

Monday 13 September 2010 4:07:10 pm

Loading a node depends of lots of things: settings / db / siteaccess / extensions..., so it's far easier to do it inside an eZ Publish module / extension happy.gif Emoticon

Monday 13 September 2010 8:35:09 pm

I know that it's far easier to do it, but is there any possibility to do it outside from ezpublish?

or any other way to fetch nodes from eZpublish inside eZcomponents..

Tuesday 14 September 2010 8:43:18 am

Okay, i found a solution:

<?php

/* /var/www/ezpublish_test/test.php */

chdir( "/var/www/ezpublish-installation/" );
require 'autoload.php';
$node = eZContentObjectTreeNode::fetch( 1 );
var_dump( $node );
?>

Tuesday 14 September 2010 10:21:57 am

yes, if you keep all db settings in settings/override, that will work.

But any settings in siteaccesses or extensions will not.

For 4.4 you should be able to do something like this (only change from 4.3 is eZSiteAccess::change() instead of changeAccess() from access.php):

chdir( "/var/www/ezpublish-installation/" );
require 'autoload.php';
eZExtension::activateExtensions( 'default' );
$access = eZSiteAccess::change( array('name' => '<siteaccess-name>') );
eZExtension::activateExtensions( 'access' );
$node = eZContentObjectTreeNode::fetch( 1 );
var_dump( $node );

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from