I would use a script to solve the scoping problem. Pass in the request, perform your logic and return a value to a <dtml-let> tag. -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jean-Francois.Doyon@CCRS.NRCan.gc.ca Sent: Wednesday, January 08, 2003 3:49 PM To: zope@zope.org Subject: [Zope] Scoping of <dtml-let> Hello, In my hunt for my memory leak, I have discivered I probably shouldn't use REQUEST.set nearly as much as I do. So now, I have a few questions/problems regarding <dtml-let> ... First of all, is there any way to have it scope over more than one object? For instance, how would I set a variable in standard_html_header that would be valid for the entire output (i.e. that could be used by other DTML code that is rendered after standard_html_header, as part of a given page of output?) For instance I used to do REQUEST.set(sniffer, usersniffer()) ... The sniffer dictionary was then available everywhere thereafter, including DTML code in the object containing the header. Unfortunately, using <dtml-let>, I can't do this, since I can't even save a dTML document where a <dtml-let> opens but isn't closed (I would close it, say, in the footer). Is there any proper DTML way of doing something liek this without using REQUEST.set ??? Also, basically on the same topic, how do I nest <dtml-let> with <dtml-if> ? One of the reasons I resorted to using REQUEST.set is because I often would want to do things like: <dtml-if ""> <dtml-let> <dtml-else> <dtml-let> </dtml-if> </dtml-let> Which doesn't work, and I bviously don't want to repeat entire blocks of code for both conditions, and in most cases breaking them out into seperate objects doesn't make sense either ... Any insight into how to get around these issues would be much appreciated! Thanks in advance, Jean-François Doyon Internet Service Development and Systems Support / Soutien de systèmes et developement de services Internet GeoAccess Division / Division GéoAccès Canada Center for Remote Sensing / Centre canadien de télédétection Natural Resources Canada / Ressources naturelles Canada Phone / Téléphone: (613) 992-4902 Fax / Télécopieur: (613) 947-2410 http://atlas.gc.ca _______________________________________________ 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 )