"Chris McDonough" <[EMAIL PROTECTED]> wrote


> I think the idiom here will be:
> <dtml-with "datamgr.getSessionData()" mapping>
>    <dtml-var foo>
> </dtml-with>
> > But I don't see how to do that, because if I
> > stick a dtml-with, for instance, into generic header code
> > (included, for example, by standard-html-header, then this
> > with statement is required to be *closed* when I edit it).
> Yeah, the split between header and footer is unfortunate
> right now... one way to have the stuff  available in all
> your documents would be to use the request namespace in the
> header:
> <dtml-let data=sessiondatamgr.getSessionData()">
>     <dtml-call "REQUEST.set(data, 'sessiondata')">
> </dtml-let>
> ...then in the rest of your documents, you could refer to
> sessiondata:
> <dtml-let data="REQUEST['sessiondata']">
> ....
> </dtml-let>
> This is not particularly encouraged.  Hopefully the upcoming
> HiperDOM will solve the header/footer split problem.

I think a cleaner near-term workaround is to have the standard
header explicitly copy all the session key-variable pairs into

 <dtml-in "sessiondatamgr.getSessionData().items()">
  <dtml-let k=sequence-key v=sequence-value>
   <dtml-call "REQUEST.set( k, v )">

(This presumes that the getSessionData() return value supplies
an items() method, which I haven't actually checked).

Tres Seaver                                [EMAIL PROTECTED]
Digital Creations     "Zope Dealers"       http://www.zope.org

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to