- Discovering sub-folders names and proprieties
Hi, I tried Zope last weekend. It's darn coooooool. Let's get Zoped!!! Now my first question in this list: How can I get the subfolders names and proprieties (e.g. title) from DTML? I want to build a navigation bar that would automatically expand when a new subfolder is added. thanks in advance, -- Paulo Eduardo Neves PUC-Rio de Janeiro Pager: Central: 292-4499 cod. 213 99 64 ou use a URL: http://www.learn.fplf.org.br/neves/mensagempager.html
At 07:42 PM 12/28/98 -0300, Paulo Eduardo Neves wrote:
How can I get the subfolders names and proprieties (e.g. title) from DTML?
Check out the online help's Object Reference. You can get to it from the 'Help' tab on the management screen. The method you are looking for is probably 'objectValues' which returns a list of sub-objects of a given type. For example to get a list of the titles of all sub-Folders try this: <!--#in expr="objectValues(['Folder'])"--> <!--#var title_or_id--> <!--#/in--> Basically this iterates though a list of sub-objects of meta-type 'Folder'. For each object it calls its 'title_or_id' method. DTML can be complex, and combining it with Zope's fairly complex API makes it even tougher. I suggest reading the Object Reference for specific questions and reading the Zope's How-To collection for some examples. http://www.zope.org/Documentation/HowTo Also don't forget that you can use the 'DTML Source' link at the bottom of every page on the Zope site to see that page's DTML. Not that my DTML is so great, but it might give you some ideas. Good luck. -Amos
participants (2)
-
Amos Latteier -
Paulo Eduardo Neves