Cookies - folder specific?
Hi there everyone, I've just been playing with cookies so as I can understand them better. One thing I am finding is the cookies are set in the current zope "level" or "folder". i.e., I have the following structure: / setmycookie showcookie /FolderA setmycookie /FolderB setmycookie When I run /setmycookie, I can then run /showcookie, /FolderA/showcookie, and /FolderB/showcookie and see the cookie (I'm still learning, but I think this works because of zopes acquisition). When I run /FolderA/setmycookie, I can then run /FolderA/showcookie and /FolderB/showcookie and see the cookie. However, /showcookie does not show the cookie. This leads me to believe that the cookie has been set at the /FolderA level. Please let me know if this is not the case. A question I have is, can I tell my /FolderA/FolderB/setmyCookie to set the cookie in /FolderA. I have tried various things such as: <dtml-with "FolderA"> <dtml-call "RESPONSE.setCookie('thecookie', 7)" > </dtml-with> But I can't seem to get it setting the cookie in FolderA. Can anyone tell me how to do this? If you are going to be nice and respond to me, please reply to my hotmail address as well as to the list. Thanks. Tim.
RESPONSE.setCookie has a path parameter. <dtml-call "RESPONSE.setCookie('thecookie', 7, path='/FolderA')"> will probably do what you want. Kevin ----- Original Message ----- From: Tim Haines <tim_haines@hotmail.com> To: <zope@zope.org> Sent: Saturday, November 20, 1999 5:54 PM Subject: [Zope] Cookies - folder specific?
/ setmycookie showcookie /FolderA setmycookie /FolderB setmycookie A question I have is, can I tell my /FolderA/FolderB/setmyCookie to set the cookie in /FolderA.
participants (2)
-
Kevin Dangoor -
Tim Haines