Share » Forums » Developer » zeta Components – eZ Publish interface

zeta Components – eZ Publish interface

zeta Components – eZ Publish interface

Monday 13 September 2010 5:32:21 am - 4 replies

Modified on Monday 13 September 2010 5:35:01 am by Phillip Casablancas

Author Message

André R.

Monday 13 September 2010 7:07:10 am

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 :)

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

Phillip Casablancas

Monday 13 September 2010 11:35:09 am

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..

Phillip Casablancas

Monday 13 September 2010 11:43:18 pm

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 );
?>

André R.

Tuesday 14 September 2010 1: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 );

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

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

36 542 Users on board!

Forums menu