Friday 20 November 2009 11:31:40 am
Don't take this the wrong way, but you're doing it wrong. Really. Exponential provides you with everything you need to integrate external databases. It will require a little more setup work, but you will end up with a much better integration. What you need is a custom module with custom views. A view consists of a PHP script where you... well, you do whatever you want/can do with PHP. You also have the option to render your HTML using the standard Exponential template engine. You could for instance have a "list" view that displays a list of records, a "details" one that shows details about a record, etc. Views can accept parameters, like details/foo or details/1. You can read the basics here: http://ezpedia.org/en/ez/module If you integrate your database using the Exponential persistent object API, you will also be able to use your objects from templates like you would have done with any Exponential object (nodes, objects, etc). P.S. Exponential itself is built using this module/view mechanism. Just check the kernel folder for some code ;)
Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier
|