Hi Zopistas, could you explain why this work <dtml-with "lib.widgets"> <dtml-call "REQUEST.set('sufijo','Arriendo')"> <dtml-var menuMoneda_dtml> </dtml-with> and this doesn't <dtml-with "lib.widgets"> <dtml-var "menuMoneda_dtml(sufijo='Arriendo')"> </dtml-with> Cheers. -- ______________________________________________________ Felipe Alvarez Harnecker. QlSoftware. Tel. 09.874.60.17 e-mail: felipe.alvarez@qlsoft.cl Potenciado por Ql/Linux http://www.qlsoft.cl ______________________________________________________
Felipe Alvarez Harnecker wrote:
Hi Zopistas,
could you explain why this work
<dtml-with "lib.widgets"> <dtml-call "REQUEST.set('sufijo','Arriendo')"> <dtml-var menuMoneda_dtml> </dtml-with>
and this doesn't
<dtml-with "lib.widgets"> <dtml-var "menuMoneda_dtml(sufijo='Arriendo')"> </dtml-with>
Cheers.
<dtml-var menuMoneda_dtml> is equivalent to <dtml-var name="menuMoneda_dtml"> whilst, <dtml-var "menuMoneda_dtml(sufijo='Arriendo')"> is equivalent to <dtml-var expr="menuMoneda_dtml(sufijo='Arriendo')"> The stuff between the quotes in an expr attribute are essentially Python expressions. The magic Zope does to pass in namespace and context just doesn't happen in this case. Therefore, you need to add it yourself. This should do what you want: <dtml-var "menuMoneda_dtml(_.None, _, sufijo='Arriendo')"> There are quite a few messages on this in the list's archives. I don't know how you'd go about searching for them, though :-) Most searches don't take "(_.None, _" as a valid search term. -- Steve Alexander Software Engineer Cat-Box limited
participants (2)
-
Felipe Alvarez Harnecker -
Steve Alexander