> However, I'd like to have this cookie set to expire one week from the date
> of the current visit. i.e., if its 12:30 on 11/3 when a surfer visits my
> site, I want Zope to set their lastVisited cookie to expire on 12:30 on
> 11/10.

Have a pythonmethod

ID expireIn1Week
Parameter List self
t = self.ZopeTime() + 7.0 # 1 week in the future
t = t.toZone('GMT')

return t.strftime("%A, %d-%b-%Y %H:%M:%S GMT")

On the page you want to set the cookie put
<dtml-call "RESPONSE.setCookie('cookiename','cookievalue', path='/',

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

Reply via email to