[Zope] Storing the Contents of a DTML Document in a Session
Variable
Jonathan Hobbs
toolkit at magma.ca
Fri Aug 27 16:51:02 EDT 2004
----- Original Message -----
From: "Asad Habib" <ahabib at engin.umich.edu>
> I have a DTML document that contains some text(no HTML or DTML) and I use
> it repeatedly in other DTML documents to assign default values to
> variables passed via a form. Is it possible to assign the contents of this
> document to a session variable? I am using the following but it is
> syntactically incorrect:
>
> <dtml-call "REQUEST.SESSION.set('test', <dtml-var no_data>)">
>
> where no_data is the name of the DTML document that contains the text. Any
> help would be greatly appreciated. Thanks.
You need to get the contents of no_data, this might work:
<dtml-call "REQUEST.SESSION.set('test', no_data.document_src() )">
if not, this should:
<dtml- let e="no_data.document_src()">
<dtml-call "REQUEST.SESSION.set('test', e)">
</dtml-let>
HTH
Jonathan
More information about the Zope
mailing list