24 Jan
2003
24 Jan
'03
10:19 p.m.
Thierry Florac wrote at 2003-1-24 12:38 +0100:
Hi,
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">
You want to learn about Python's list comprehension: You can use: <dtml-in expr="[object for object in objectValues() if object.visible]"> .... Precisely, what you want and very intuitive.... Dieter