How do you increment a variable?
I am having a *bad* day, I don't seem to be able to get *any* of my Zope stuff to work today :( I can't get this to work. <dtml-let counter="1"> Counter:<dtml-var counter>, <dtml-var counter="counter+1"> (Line A) <dtml-var counter> </dtml-let> I've tried the following variants on Line A. 1) <dtml-var counter="counter+1"> gives: Invalid attribute name, "counter", for tag <dtml-var counter="counter+1"> 2) <dtml-var "counter=counter+1"> gives: Invalid Syntax <dtml-var "counter=counter+1">, 3) <dtml-call "counter=counter+1"> gives: Python syntax error <dtml-call "counter=counter+1"> I think all my Zope knowledge has gone out the window. It's Zope 2.0b1 on Solaris 5.6 Tone (miserable) ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2
This works. Looks damn ugly though...note that there's no <dtml-let> tags evident (I believe <dtml-let> creates *another* namespace, apart from the REQUEST one). I could really do with help on my other post though on 'Interrogating DTML...' <dtml-call "REQUEST.set('counter', 1)"> Counter:<dtml-var counter>, <dtml-call "REQUEST.set('counter', counter+1)"> <dtml-var counter> At 3:11 pm +0100 29/7/99, Tony McDonald wrote:
I am having a *bad* day, I don't seem to be able to get *any* of my Zope stuff to work today :(
I can't get this to work. <dtml-let counter="1"> Counter:<dtml-var counter>, <dtml-var counter="counter+1"> (Line A) <dtml-var counter> </dtml-let>
wiped-out-ly, tone. ------ Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2
participants (1)
-
Tony McDonald