On Fri, 2003-01-24 at 14:23, Ed Leafe wrote:
On Friday, January 24, 2003, at 06:38 AM, Thierry Florac wrote:
A little question about the "dtml-in" tag.
What I'd like to do is to build a list according to a property value, like we can do with for "for" Python instruction, something like :
<dtml-in "object for object in objectValues() if object.visible">
Is there any way to achieve this, without writing a custom method ??
<dtml-in objectValues()> <dtml-if visible> ... </dtml-if> </dtml-in>
The problems when handling "dtml-in" in such a way are that : - you can't handle "sequence-start" or "sequence-end" correctly, when the first or last elements are not visible ; - you can't handle "dtml-else" correctly, when all the elements are not visible... :-((( Thierry