Copy from different levels at the same time?
Hi there I guess my problem had come up before, but I couldn´t find it in the archive. 1) I´ve got a folder hierarchy: A B C 2) I use an external method to go through the hierarchy and display it in a way similar to the ZMI (manage_workspace): <form> []A [] B [] C [copy] [rename] [...] </form> 3) If selected, the id of each folder is stored in "ids" which is a list (like it is in manage_workspace): [X]A [ ] B [X] C -> ids['A','C'] 4) Now I want to copy the folders I selected somewhere else. So I send ids towards a DTML Method called "action" which is placed above the hierarchy. I tried to do <dtml-call "REQUEST.set('clipboard',manage_copyObjects(ids))"> but I got some errors. I guess the point is the "self" in manage_copyObjects(self,...,), isn´t it? I tried to simply select "A" and moreover I added <dtml-with parent_folder_of_A> ...manage_copyObjects(ids) </dtml-with> in my "action" method. It worked! So I concluded that I need to get the context of every object in ids. The problem is that the objects are placed in different levels of the hierarchy. To solve this problem I thought of something like: **** PSEUDO-CODE ********* Script: for object in ids: getParent(object)/getContext(object) or in dtml: <dtml-in ids> <dtml-with sequence-item(PARENTS[1]) </dtml-with> </dtml-in> ************************** I don´t exactly know how to do that. Any suggestions? ______________________________________________________________________________ All inclusive! 100 MB Speicher, 1000 Mails, Wunschrufnummer, Superstars, Events, Preisvorteile und mehr unter http://club.web.de/?mc=021104
participants (1)
-
c.koll@web.de