[Zope] Cookies - folder specific?

Tim Haines tim_haines@hotmail.com
Sat, 20 Nov 1999 22:54:21 -0000


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.