> -----Original Message-----
> From: Mabe, Brad [mailto:[EMAIL PROTECTED]]
> Sent: 25 May 2000 16:29
> To: '[EMAIL PROTECTED]'
> Subject: [Zope] Cookies
> 
> I am trying to create a cookie based on the value returned from a sql
> method.  The following code fails with an invalid syntax error.
> 
> <dtml-in SQL_get_cntry>
>   <dtml-call "RESPONSE.setCookie('country_cookie', <dtml-var cntry_cd>)">
> <dtml-in>

Hi,

Inside quotation marks, you're writing python, so <dtml-var cntry_cd> makes
the parser barf. cntry_cd is pushed onto the namespace by the <dtml-in>, so
you can simply use:

<dtml-in SQL_get_cntry>
  <dtml-call "RESPONSE.setCookie('country_cookie', cntry_cd)">
</dtml-in>

Note also the slash in the closing </dtml-in>.

hth,

-- Marcus

_______________________________________________
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 )

Reply via email to