[Zope-dev] Recursive Folders programatically

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


Zopists,

I forgot about the 'let' tag.  It ain't pretty but it works. Here's the
code in DTML for recursive folder generation:

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

ugly.

Sorry to mail when the answer was in the vaccum of my memory.

All my best,

Jason Spisak
444@hiretechs.com