[Zope] adding database records programitically

Andy Pahne ap@net22.net
Fri, 5 May 2000 12:58:36 +0200


hi, there,

i have a few folders lying around in zope, and each of these folders
contains a set of dtml-methods. each of the folders represents a page inside
the website we are hosting. the dtml-methods hold the content for the pages.

this kind of setup worked nice for a long time, but now there are too much
folders, too much methods to maintain, and I am planning to move the
contents into the database.

I want to avoid typing all the data in again, because that has been done
already. I tried this:

<dtml-in "objectValues(['Folder'])">
  <dtml-with "_['sequence-item']">
     <dtml-call "a_sql_method_to_add_the_thing_into_the_database">
  </dtml-with>
</dtml-in>


but this approach did not work for me. if  i use   <dtml-with nameOfFolder>,
everything works fine, but iterating over the folders and using <dtml-with
"_[sequence-item']"> did not.



Andy Pahne, ap@net22.net

net22 GmbH
Bad Meinberger Strasse 1
32760 Detmold
0 52 31 - 580 640

http://www.net22.net