5 Feb
2003
5 Feb
'03
6 p.m.
You're only changing the value of counter in the scope of the Python script. Your script is returning the new value, but you aren't doing anything with that value. That's why it appears not to be working. But once you get that right, you'll turn up other hassles. :-) I'd advise against using a Python script for this. If all you're doing is counting iterations over a loop, it may be far easier to do this: <dtml-call "REQUEST.set('my_ids', [])"> ... <dtml-if "some_test"> <dtml-call "my_ids.append(getId())"> <a href ="/my_folder/<dtml-var "my_ids[:-1]">> # <dtml-var "my_ids[:-1]"> </a> </dtml-if> ... <dtml-var "len(my_ids)"> item(s) were found. Etc., etc. HTH, Dylan