[Zope] Converting a string path

Rodrigo Leme de Mello rleme@idg.com.br
Wed, 14 Mar 2001 20:02:40 -0300


Hi Zopers,

I need some help about a way to "enter" inside
in a folder to list itīs content.

I have the complete path to this folder saved in
a property of a DTML Document as a string.

Example:

- DTML Document id = debug
- Name of the property with the path = path_atr
- Value of the path_atr = 'folder1/folder2/folder3'
Regarding this structure:

root
   |----folder
            |----folder1
                     |------folder2
                                |--------folder3
                                            |--------obj1
                                            |--------obj2
                                            |--------obj3

Now, i want to list this objects that are inside folder3.
Iīve already know that i can use this form supposing
i am inside the folder called "folder"

<dtml-in "folder1.folder2.folder3.ObjectValues()">

</dtml-in>

Now, letīs go to the problem.
The value of the atribute called path_atr changes all the time and the
number of
levels that this path will have will also change. Ex:

- Value of the path = 'otherfolder1/otherfolder2'
- Value of the path = 'folder1/folder2'
- Value of the path = 'folder_one/folder_two/folder_tree'

So, how can i take this value and interate inside the folder correspondent
to it.?

Any help will be welcome

Regards

Rodrigo