[DTML] I give UP!!!! (well, almost... ;))
I've been trying to figure this out, and I've given up (at least for the day...:(). How do I change the value of a temporary variable that I created with a namespace method? e.g.: <!--#with "_.namespace(prev_value=0)"--> <!--#in somelist--> <!--#if "somevalue_from_somelist > prev_value"--> <!-- ***here I want to set prev_value to somevalue_from_somelist*** --> <!--#/if--> ... <!--#if "somevalue_from_somelist < prev_value"--> <!-- ***here I want to set prev_value to somevalue_from_somelist*** --> <!--#/if--> <!--#/in--> <!--#/with--> ... I tried the following and they don't work : <!--#call "_.namespace(prev_value = somevalue_from_somelist)"--> <!--#call "_.namespace(prev_value = _['somevalue_from_somelist'])"--> I've tried to look at the dtml of all the products I've d/l'ed and also at the proto-FAQ but I haven't found one that exactly does this. Thanks in advance to any DTML guru(s) who can help me this... Butch Landingin butchland@yahoo.com _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com
At 09:12 10/03/99 , Butch Landingin wrote:
I've been trying to figure this out, and I've given up (at least for the day...:(). How do I change the value of a temporary variable that I created with a namespace method? e.g.:
<!--#with "_.namespace(prev_value=0)"--> <!--#in somelist--> <!--#if "somevalue_from_somelist > prev_value"-->
<!-- ***here I want to set prev_value to somevalue_from_somelist*** -->
<!--#/if-->
...
<!--#if "somevalue_from_somelist < prev_value"-->
<!-- ***here I want to set prev_value to somevalue_from_somelist*** -->
<!--#/if--> <!--#/in--> <!--#/with--> ...
You can't. But you can set variables using the set method of the REQUEST object. More info can be found in the FAQ (a work in progress from the Zope Documentation Project, aka ZDP). A online version can be found at http://www.gaaros.com:9673/FAQ, the question to look for is in the DTML section, and called 'How do I define a variable for use in a document?'. Martijn Pieters -- M.J. Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-6254545 Fax: +31-35-6254555 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (2)
-
Butch Landingin -
Martijn Pieters