[Zope] Re: global varible to files
Maik Jablonski
maik.jablonski at uni-bielefeld.de
Wed May 12 13:27:51 EDT 2004
Jianping Zhu wrote:
> I in a file i have code like this:
> <dtml-if "teach=='y'">
> <dtml-let t="'Yes'"></dtml-let>
> <dtml-else>
> <dtml-let t="'No'"></dtml-let>
> </dtml-if>
>
> I want to access varible t outside this if loop how can i declear it
> global to the entire file?
Use the REQUEST-Object to store "global" variables for current page-request:
<dtml-if "teach=='y'">
<dtml-call "REQUEST.set('t','Yes')">
<dtml-else>
<dtml-call "REQUEST.set('t','No')">
</dtml-if>
Cheers, Maik
More information about the Zope
mailing list