Using PHP to Pubish eZPublish Content

Author Message

Deane Barker

Friday 20 June 2003 2:50:00 pm

(Note: I just found eZPublish today, so if this is painfully obvious to everyone else, just let me know.)

I want to use eZ for the admin side opf a site, but use traditional PHP on the publishing side. In other words, I want to make regular SQL SELECT calls against the eZ database to render pages.

To this end, I have created a function to get all the objects of a particular class, loop through them, and write their properties to a two-dimensional array:

So the function returns an array, and you do an array_shift through it, and refer to the properties like:

print $array["property_identifier");

The outside array will have one element for each object, and that element will have one element for each property.

You can view the code here:

http://www.deanebarker.net/Buildings.php.txt

I just wrote it in the last 15 minutes, so it's not perfectly clean or anything, and I'm recursing a SQL call, which I know is inefficient.

Am I on the right track with this? I have to believe that someone else has done this before.

Deane

Deane Barker

Friday 20 June 2003 3:57:13 pm

Um, yeah, well, I just found the PHP classes, so forget this posting was ever entered.

Sorry.

Deane

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