[Zope] Storing the Contents of a DTML Document in a Session Variable

Jonathan Hobbs toolkit at magma.ca
Fri Aug 27 17:58:40 EDT 2004


document_src is described in the zope book.

Jonathan


----- Original Message -----
From: "Asad Habib" <ahabib at engin.umich.edu>
To: "Jonathan Hobbs" <toolkit at magma.ca>
Sent: August 27, 2004 5:14 PM
Subject: Re: [Zope] Storing the Contents of a DTML Document in a Session
Variable


> Hello Jonathan. Thanks for your help. I did a search for document_src on
> the Zope community web site but did not see it there. Which API does
> document_src belong to? Thanks.
>
> - Asad
>
>
> On Fri, 27 Aug 2004, Jonathan Hobbs wrote:
>
> > ----- 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
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope at zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> >




More information about the Zope mailing list