[Zope] Looking into folders

Dieter Maurer dieter@handshake.de
Fri, 23 Jun 2000 20:33:20 +0200 (CEST)


Dieter Maurer writes:
 > Felipe Alvarez Harnecker writes:
 >  > I want to manipulate every object returned by the "tree" tag like this
 >  > 
 >  > <dtml-tree bla bla ..>
 >  > 
 >  >  <dtml-let myObject="tree object">
 >  > 
 >  >    <dtml-var myObject.someProperty_or_method_or_something>
 >  > 
 >  >  </dtml-let>
 >  > 
 >  > </dtml-tree>
 > A look at the tree tag code in "TreeDisplay.TreeTag" convinced
 > me, that (unlike "dtml-in") "dtml-tree" does not provide
 > a direct reference to the rendered object.
 > You may (or may not) have luck and the rendered object has
 > a "this" method (many Zope objects have).
 > Then you can use "this()" as a reference to the object.
 > You must take care for cases, when "this" does not exist.
I realized, that you simply can use

	<dtml-var someProperty_or_method_or_something>

You effectively have a

	<dtml-with tree-item>
	...
	</dtml-with>

around the DTML block handling the item.


Dieter