Current item in a dtml tree
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. Any ideas? TIA, Tommy Innovation: The Best Way To Predict The Future ... Is To Create It.
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
participants (2)
-
Dieter Maurer -
Tommy Johnson