[Zope] Cookie Question

2000-07-11 Thread Rob Pratt

Hello.

Here's what I'm trying to do:

dtml-if "REQUEST.cookies['cookie_name']"

... do something using data from the cookie ...

/dtml-if

This syntax, though, continually throws errors--a key error on 
'cookie_name'. I've tried nesting the dtml-if statements within dtml-with 
REQUEST/dtml-with statements.

What am I doing wrong? What concept am I missing?


Rob Pratt
[EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Cookie Question

2000-07-11 Thread Terry Kerr

maybe the cookie name doesn't exist.

try dtml-if "REQUEST.cookies.has_key('cookie_name')"

Rob Pratt wrote:

 Hello.

 Here's what I'm trying to do:

 dtml-if "REQUEST.cookies['cookie_name']"

 ... do something using data from the cookie ...

 /dtml-if

 This syntax, though, continually throws errors--a key error on
 'cookie_name'. I've tried nesting the dtml-if statements within dtml-with
 REQUEST/dtml-with statements.

 What am I doing wrong? What concept am I missing?

 Rob Pratt
 [EMAIL PROTECTED]

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )

--
Terry Kerr ([EMAIL PROTECTED])
Adroit Internet Solutions Pty Ltd (www.adroit.net)
Phone:   +613 9563 4461
Fax: +613 9563 3856
Mobile:  +61 414 938 124
ICQ: 79303381




___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Cookie Question

2000-07-11 Thread David Brown

I've found that just

dtml-if cookie_name

...

/dtml-if

is sufficient.  The cookies end up in the namespace.

At 01:04 PM 7/12/2000 +1000, Terry Kerr wrote:
maybe the cookie name doesn't exist.

try dtml-if "REQUEST.cookies.has_key('cookie_name')"

Rob Pratt wrote:

  Hello.
 
  Here's what I'm trying to do:
 
  dtml-if "REQUEST.cookies['cookie_name']"
 
  ... do something using data from the cookie ...
 
  /dtml-if


___
Zope maillist  -  [EMAIL PROTECTED]
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 )