Friday 30 May 2003 5:03:35 am
From my understanding, exporting a class isn't all too hard. It's basically four tables you need to take care of, ezcontentclass and ezcontentclass_attribute and ezcontentclassgroup_attribute (ezcontentclassgroup is only needed if your content class is in a new group). From ezcontentclass you need to export exactly the one row with the id of your class. From ezcontentclass_attribute you need to export all rows where contentclass_id has the same value as id above. This will basically contain the design of your class. Now to actually see your class show up in the class list, you also need to export the rows with the matching contentclass_id from ezcontentclassgroup_attribute as these will tell ezpublish where to put the class in the system. If I weren't hacking on my mail server, I'd probably write the few lines that are needed for this. Or maybe I will, anyway. If you want it done the fast way, use ezDB and manipulate the DBs yourself, if you want it to do right, you should go the way through the API which is much more complex. I think bypassing the API, this job could be done in about 50 lines.
Visit http://triligon.org
|