I am sure that this has been asked before but for some reason I cant find the answer. I am developing a small application and in part of it I want one page to recursively call itself and display a new sub-page depending on which link was clicked on. I am trying to just create a variable that I can set to the new method but I always get an error. How do you just make an arbitrary variable. I tried <dtml-var somename> = <dtml-var somemethod> and it did not like that complained about there not being a somename well that's what I am trying to make. -Bryan
I'm a newbie myself, but this is what I found Maybe you want to use <dtml-let myvar1="'hello'" myvar2="'hello2'"> </dtml-let> or you may want to use REQUEST.set('myvar, 'myvalue') or if you want to look at FSSession product, which provides session persistent variables. Hope this helps, Michal Bukovjan "Coleman, Bryan" wrote:
I am sure that this has been asked before but for some reason I cant find the answer.
I am developing a small application and in part of it I want one page to recursively call itself and display a new sub-page depending on which link was clicked on. I am trying to just create a variable that I can set to the new method but I always get an error.
How do you just make an arbitrary variable.
I tried <dtml-var somename> = <dtml-var somemethod> and it did not like that complained about there not being a somename well that's what I am trying to make.
-Bryan
_______________________________________________ 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 )
On Wed, Apr 19, 2000 at 11:03:21AM -0400, Coleman, Bryan wrote:
I am sure that this has been asked before but for some reason I cant find the answer.
I am developing a small application and in part of it I want one page to recursively call itself and display a new sub-page depending on which link was clicked on. I am trying to just create a variable that I can set to the new method but I always get an error.
How do you just make an arbitrary variable.
I tried <dtml-var somename> = <dtml-var somemethod> and it did not like that complained about there not being a somename well that's what I am trying to make.
The easiest way is to use REQUEST.set: <dtml-call "REQUEST.set('myvariable','myvalue')"> Another way to do it is to use dtml-let. This is "cleaner" if you will only need the variable for a short time. <dtml-let nums="(4,5,6)"> nums forward: <dtml-in nums><dtml-var sequence-item> </dtml-in> nums backward: <dtml-in nums reverse><dtml-var sequence-item> </dtml-in> </dtml-let> Nums only exists between the two <dtml-let statements>. -- Stephen Pitts smpitts@midsouth.rr.com
participants (3)
-
Coleman, Bryan -
Michal Bukovjan -
Stephen Pitts