Newbie: How to change the value of a dtml-var?
Please help, i have tried everything. I just simple want to change the value of a let variable i created. Is this possible to do? I want something like this: <dtml-let x="blank"> <dtml-var x> = "test1" //I dont want to print anything here, just change the value of variable x </dtml-let> __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Nope. You'll have to set it in the request to change it, something along the lines of: <dtml-call "REQUEST.set('x', 'blank')"> <dtml-call "REQUEST.set('x', 'somethingelse')"> And before anyone gets a chance to say it, consider using a Python Script for this kind of logic. Cheers. -- Andy McKay. ----- Original Message ----- From: "P Cowley" <pythoniac@yahoo.com> To: <zope@zope.org> Sent: Friday, July 27, 2001 3:33 PM Subject: [Zope] Newbie: How to change the value of a dtml-var?
Please help, i have tried everything.
I just simple want to change the value of a let variable i created. Is this possible to do?
I want something like this:
<dtml-let x="blank"> <dtml-var x> = "test1" //I dont want to print anything here, just change the value of variable x </dtml-let>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
It works! I was thinking it would have to be approached differently. Thanks --- Andy McKay <andym@ActiveState.com> wrote:
Nope. You'll have to set it in the request to change it, something along the lines of:
<dtml-call "REQUEST.set('x', 'blank')"> <dtml-call "REQUEST.set('x', 'somethingelse')">
And before anyone gets a chance to say it, consider using a Python Script for this kind of logic.
Cheers. -- Andy McKay.
----- Original Message ----- From: "P Cowley" <pythoniac@yahoo.com> To: <zope@zope.org> Sent: Friday, July 27, 2001 3:33 PM Subject: [Zope] Newbie: How to change the value of a dtml-var?
Please help, i have tried everything.
I just simple want to change the value of a let variable i created. Is this possible to do?
I want something like this:
<dtml-let x="blank"> <dtml-var x> = "test1" //I dont want to print anything here, just change the value of variable x </dtml-let>
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
If I had to do it in DTML, I would do it like: <dtml-call "REQUEST.set('x', 'blank')"> The value of 'x' is: <dtml-var x><br> <dtml-call "REQUEST.set('x', 'test1')"> The value of 'x' is now: <dtml-var x> However, to quote the Zope Book: "When you find yourself writing complex DTML that requires things like new variables, there's a good chance that you could do the same thing better with Python or Perl. Advanced scripting is covered in Chapter 8." HTH, Eric.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of P Cowley Sent: Friday, July 27, 2001 3:33 PM To: zope@zope.org Subject: [Zope] Newbie: How to change the value of a dtml-var?
Please help, i have tried everything.
I just simple want to change the value of a let variable i created. Is this possible to do?
I want something like this:
<dtml-let x="blank"> <dtml-var x> = "test1" //I dont want to print anything here, just change the value of variable x </dtml-let>
participants (3)
-
Andy McKay -
Eric Walstad -
P Cowley