[Zope-dev] Programatically trying to create recursive folders

Jason Spisak 444@hiretechs.com
Fri, 13 Oct 2000 14:16:44 -0700


Zopists,

In orderto get around the confliting writes issues I am experiencing, I
would like to create
recrusive folders like, /0/1, /0/2, etc., so that my objects will be in
many different folders.
I am trying to get DTML to create these pre-set drop folders
automatically, but am unable to do so.

The following code throws an id already in use error, because the 'with'
tag is not letting the newly
created object's namespace be used for the creation of the second
folder.

<dtml-in expr="_.range(0, 2)">
 <dtml-with "manage_addFolder(_.str(_['sequence-item']),
_.str(_['sequence-item']))">
  <dtml-in expr="_.range(0, 2)">
   <dtml-call "manage_addFolder(_.str(_['sequence-item']),
_.str(_['sequence-item']))">
  </dtml-in>
 </dtml-with>
</dtml-in>

Any ideas?

All my best,

Jason Spisak
444@hiretechs.com