[Zope] Modifiable local variables

Ender kthangavelu@earthlink.net
Tue, 24 Oct 2000 10:47:24 -0700


Sean McGrath wrote:
> 
> Hello all,
> 
> I am trying to use the DTML engine outside of Zope, and would like to be
> able to create local variables in my DTML documents. Because I have no
> access to Zope, I can't do REQUEST.set, nor can I use the method shown on
> http://www.zope.org/Members/Duncan/LocalVars. So, the questions is, what is
> the recommended way to create modifiable variables using DTML, without
> using Zope?
> 
> Thanks in advance


i've used dtml outside of zope, but i tend to pass it most of the
variables it needs and let it do the rendering. 

you should be able to pass an empty dict to the dtml as the mapping
arguement and set variables inside of that, although you might have to
wrap it with attributing setting methods so that it can be used from
dtml. or you can use a dtml-let clause to create the proper variables.

<dtml-let x="1+2">
	<dtml-var x>
	<dtml-var "x/2">
</dtml-let>

long live the pyxies:)

kapil

> 
> _______________________________________________
> 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 )