[Zope] Accessing properties of child objects

Dieter Maurer dieter@handshake.de
Mon, 28 Jan 2002 21:19:21 +0100


Tille, Andreas writes:
 > ....
 > I just tried:
 > 
 > <h2><dtml-with tinytable><dtml-if title><dtml-var title><dtml-else>No Title</dtml-if></dtml-with></h2>
 > <dtml-in tinytable>
 >   <dtml-var Col1> - <dtml-var Col2> - <dtml-var Col3><br />
 > </dtml-in>
 > 
 > But I seem to misunderstand some principles about aquisition of
 > properties because the title is every time the title of the
 > base dtml document the TinyTable is presented in.
You may try '<dtml-with expr="tinytable">'.
If you do not use "expr", then "tinytable" is rendered (i.e. called)
and the result is probably a sequence which does not have a "title"
attribute.

You may find more information about non-transparent name lookup
in the "Name lookup" section of

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

But you probably know that already....



Dieter