zeta Components – eZ Publish interface

Author Message

Phillip Casablancas

Monday 13 September 2010 5:32:21 am

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.

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

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

eZ debug

Timing: Jan 29 2025 23:51:49
Script start
Timing: Jan 29 2025 23:51:49
Module start 'layout'
Timing: Jan 29 2025 23:51:49
Module start 'content'
Timing: Jan 29 2025 23:51:49
Module end 'content'
Timing: Jan 29 2025 23:51:49
Script end

Main resources:

Total runtime0.0200 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.1563151.2109
Module start 'layout' 0.00580.0033 739.367236.6484
Module start 'content' 0.00910.0094 776.015694.1875
Module end 'content' 0.01850.0014 870.203133.9922
Script end 0.0200  904.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002612.7852140.0002
Check MTime0.00125.9354140.0001
Mysql Total
Database connection0.00084.019710.0008
Mysqli_queries0.002914.588830.0010
Looping result0.00000.089410.0000
Template Total0.00105.110.0010
Template load0.00084.015010.0008
Template processing0.00021.020410.0002
Override
Cache load0.00062.789510.0006
General
dbfile0.002613.027280.0003
String conversion0.00000.044140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs