Hi Zopists, I would like to call some DTML method on all Folders in my ZODB. I think the best way should be recursion but I do not know how to do it in DTML. Please, can you help me, or do you know any HOW-TO etc? I have found nothing. Petr PS I need it for Zope 2.1.6 and 2.3.0 also -- Petr Knápek NEXTRA Czech Republic, s.r.o., Hlinky 114, 603 00 Brno, Czech Republic e-mail: mailto:petr.knapek@nextra.cz tel:+420-5-43 554 150 FAX:+420-5-43 554 214
Petr Knapek wrote:
Hi Zopists,
I would like to call some DTML method on all Folders in my ZODB. I think the best way should be recursion but I do not know how to do it in DTML.
Please, can you help me, or do you know any HOW-TO etc? I have found nothing.
I have a reindex method that does this: (simplified) <dtml-in "objectItems(['my zclass types - could be Folders for you')"> Indexing &dtml-id; ... <dtml-with sequence-item> <dtml-call "this().reindex_object()"> <<<< Whatever you want done on each item ... Done: <dtml-var "this().absolute_url()"></br> </dtml-with> </dtml-in> <dtml-in "objectItems(['Folder'])"> <dtml-with sequence-item> <b>Entering <dtml-var id></b></br> <dtml-var reindex> <<<< The recursive call! </dtml-with> </dtml-in> HTH Ivan
On 29 Mar 2001, Petr Knapek wrote:
Hi Zopists,
I would like to call some DTML method on all Folders in my ZODB. I think the best way should be recursion but I do not know how to do it in DTML.
Please, can you help me, or do you know any HOW-TO etc? I have found nothing.
Petr
PS I need it for Zope 2.1.6 and 2.3.0 also
maybe http://www.zope.org/Members/sabaini/recursionminihowto can give you a starting point. i wrote this one on 2.1.6, i have no idea if it'll work with 2.3.0 feel free to contact me if you have questions. ru, peter. -- _________________________________________________ peter sabaini, mailto: sabaini@niil.at -------------------------------------------------
On 29 Mar 2001 16:10:22 +0200, Petr Knapek wrote:
Hi Zopists,
I would like to call some DTML method on all Folders in my ZODB. I think the best way should be recursion but I do not know how to do it in DTML.
Don't do it with DTML use a Python Method/Script. Bill
participants (4)
-
Bill Anderson -
Ivan Cornell -
Peter Sabaini -
Petr Knapek