[Zope] Render DTML Document title inside another DTML
Document in parent folder
chas
panda@skinnyhippo.com
Sun, 03 Oct 1999 16:27:07 +0800
At 10:28 AM 10/3/99 -0500, Ping Lau wrote:
>>>>
<excerpt><smaller>Chas,
</smaller>
<smaller>Thanks. It works. Now I want to generalize it. I will create
more folders inside FolderA and FolderB. Each newly created folder will
contain at least one DTML Document that calls Doc1. Thus Doc1 has to
determine which Doc from which folder dynamically. The goal is to use
make Doc1 uses its own properties to render common results & uses
caller's properties to render specific results. Any idea how to do that?
Thanks.
</smaller></excerpt><<<<<<<<
I'm pretty sure that you're looking for objectValues()
which allows you to dynamically consider each object
within a folder.
eg. I use a variant of this often to automatically generate navigation
menus :
<<dtml-in "FolderA.objectValues()">
<<dtml-if "meta_type=='Folder'">
<<A HREF="<<dtml-var BASE1>/<<dtml-var id>"><<dtml-var
title><<BR>
<</dtml-if>
<</dtml-in>
You can extend that to calling methods or whatever it is you have to
do.
look up objectValues in the documentation though it may be better
to go check loads of examples in the archive,
chas