Recursively show content of document in subfolders
Dear all, example I have a directory structure like this: zoo -- |-- birds | |-- mamals |-- reptiles Each subfolder (birds, mamals, reptiles) has a DTML Method called 'description' which contains a short description of each group of animal. I want to make a DTML Method in zoo folder that show the description of each group of animal. How to do it in Zope? Thanks. -- mico@cbn.net.id --- Ph. 62-22-2505549 ICQ #12521756
On Wednesday 19 February 2003 05:18, Mico Siahaan wrote:
Dear all,
example I have a directory structure like this:
zoo --
|-- birds | |-- mamals |-- reptiles
Each subfolder (birds, mamals, reptiles) has a DTML Method called 'description' which contains a short description of each group of animal.
I want to make a DTML Method in zoo folder that show the description of each group of animal. How to do it in Zope?
untested: #dtml method in zoo (zoo_method) <dtml-var title> <dtml-var description> call it like so: server.domain/zoo/birds/zoo_method server.domain/zoo/reptiles/zoo_method
Thanks.
-- http://www.kedai.com.my/ http://www.kedai.com.my/eZine http://www.zope.org/Members/kedai http://www.my-zope.org How can I laugh tomorrow, if i can't even smile today.
Mico Siahaan wrote at 2003-2-18 16:18 -0500:
example I have a directory structure like this:
zoo -- |-- birds | |-- mamals |-- reptiles
Each subfolder (birds, mamals, reptiles) has a DTML Method called 'description' which contains a short description of each group of animal.
I want to make a DTML Method in zoo folder that show the description of each group of animal. How to do it in Zope?
The "ObjectManager" method "objectValues" gives you the content of an ObjectManager (a "Folder" is such a beast). You can restrict the meta_type for the objects returned. Please read the embedded online help (Zope Help --> API Reference --> Object Manager). With "tal:repeat" or "dtml-in", respectively, you itereate over a sequence (such as the one returned by "objectValues"). If necessaary, the Zope Book tells you more... Dieter
participants (3)
-
Bakhtiar A Hamid -
Dieter Maurer -
Mico Siahaan