[Zope] Current item in a dtml tree
Dieter Maurer
dieter@handshake.de
Thu, 30 Aug 2001 22:28:04 +0200 (CEST)
Tommy Johnson writes:
> How do I get the current object from a dtml tree? With dtml-in, I can use
> sequence-item, but that doesn't work with the tree.
>
> The situation is that I'm using an external method to return a list, and
> then I want to do certain actions with the current object in the list.
As you noticed, "tree" does not support such a variable.
Your options:
1. Enhance the "tree" code to give it this new variable
2. Most Zope objects have a "this()" method which returns
the object. If the objects in your list are Zope
objects, then you can use "this()".
Otherwise, you may enhance the objects in your list
by a "this()" method.
Dieter