16 Jan
2003
16 Jan
'03
9:52 p.m.
Ken wrote at 2003-1-16 17:39 +0100:
Maybe I'd better re-phrase my question. I think it will be easy for many of you, maybe even me.. I had too much coffee last night.
How do you get the length of results for a <dtml-if> inside a <dtml-in> ? You do *NOT* do this in DTML!
In Python, you simple count all positive hits in a loop: i= 0 for o in context.objectValues(): if ...: i+= 1 return i or you use "list comprehension" (see Python documentation) and "len" return len([o for o in context.objectValues() if ...]) You see, how easy it is in Python? Dieter