Forums / Developer / zeta Components – Exponential interface
Phillip Casablancas
Monday 13 September 2010 5:32:21 am
Hi Guys,
is there any possibility to fetch Nodes from Exponential in zeta Components?
for example, I have two folders. the first folder contains the Exponential installation and the second folder contains a file that tries to fetch nodes from Exponential.
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 Exponential 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
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 Exponential?
or any other way to fetch nodes from Exponential inside eZcomponents..
Monday 13 September 2010 11:43:18 pm
Okay, i found a solution:
<?php
/* /var/www/ezpublish_test/test.php */
chdir( "/var/www/Exponential-installation/" ); require 'autoload.php'; $node = eZContentObjectTreeNode::fetch( 1 ); var_dump( $node );?>
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/Exponential-installation/" ); require 'autoload.php'; eZExtension::activateExtensions( 'default' ); $access = eZSiteAccess::change( array('name' => '<siteaccess-name>') ); eZExtension::activateExtensions( 'access' ); $node = eZContentObjectTreeNode::fetch( 1 );var_dump( $node );