Hi Zopistas, Hope you can help me .. (I'm hating DTML right now ) Take this dtml document with name: dontWork_dtml <dtml-return "a+'-'+b+'-'+c"> I want de document act like a function that concatenates a,b and c but if at other document i do something like <let a="'1'" b="'2'" c="'3" d=dontWork_dtml
<dtml-call "REQUEST.set('a','2')"> <dtml-var d> </dtml-let> guess what: it renders 2-2-3 That is d is not a string but an expression. The question is How the Fck. can i implement the concatenation of 3 arguments ? Gracias por vuestra paciencia. -- ______________________________________________________ Felipe Alvarez Harnecker. QlSoftware. Tel. 09.874.60.17 e-mail: felipe.alvarez@qlsoft.cl Potenciado por Ql/Linux http://www.qlsoft.cl/ ______________________________________________________
On Fri, 2 Jun 2000, Felipe Alvarez Harnecker wrote:
<let a="'1'" b="'2'" c="'3" d=dontWork_dtml <dtml-call "REQUEST.set('a','2')"> <dtml-var d> </dtml-let>
guess what:
it renders
2-2-3
That is d is not a string but an expression.
Hey, this is a cool trick <grin>. What is happening here is that you are assigning the *function* to d, not its result, so when you do the dtml-var, dtml calls the function and it gets evaluated in the current context. If you make your let expression something like (untested): d="dontWork_dtml(_.None,_)" I think you'll get the result you were looking for. (The _.None,_ pass the namespace in to the method so that it can find a b and c.) --RDM
participants (2)
-
Felipe Alvarez Harnecker -
R. David Murray