[Zope] cookies + zpt
Jos van der Vleuten
Jos.van.der.Vleuten@transiciel.nl
Wed, 2 Apr 2003 18:28:11 +0200
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>cookies + zpt</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>hello list,</FONT>
</P>
<P><FONT SIZE=3D2>I saw that the first time i send this question to the =
list it was in RTF-format and not nice readable, so i send it =
again.</FONT></P>
<P><FONT SIZE=3D2>I want to use something like the Zope tutorial lesson =
9 in ZPT, </FONT>
<BR><FONT SIZE=3D2>but i don't now how to do this. Any =
suggestions?</FONT>
<BR><FONT SIZE=3D2>This is the DTML version from the tutorial i'm =
talking about:</FONT>
</P>
<P><FONT SIZE=3D2><dtml-call =
expr=3D"RESPONSE.setCookie('lastVisited', =
_.DateTime())"></FONT>
</P>
<P><FONT SIZE=3D2><dtml-comment></FONT>
<BR><FONT SIZE=3D2>If this is their first time here set a default =
value</FONT>
<BR><FONT SIZE=3D2>for lastVisited, since they won't have the cookie =
yet.</FONT>
<BR><FONT SIZE=3D2></dtml-comment></FONT>
</P>
<P><FONT SIZE=3D2><dtml-unless lastVisited></FONT>
<BR><FONT SIZE=3D2> <dtml-call =
"REQUEST.set('lastVisited','1999/01/01')"></FONT>
<BR><FONT SIZE=3D2></dtml-unless></FONT>
</P>
<P><FONT SIZE=3D2><h2><dtml-var title></h2></FONT>
</P>
<P><FONT SIZE=3D2><dtml-in =
"sightingsFolder.objectValues()"></FONT>
<BR><FONT SIZE=3D2><dtml-if =
expr=3D"bobobase_modification_time() > =
_.DateTime(lastVisited)"></FONT>
<BR><FONT SIZE=3D2><b>New</b></FONT>
<BR><FONT SIZE=3D2></dtml-if></FONT>
<BR><FONT SIZE=3D2><dtml-var sequence-item></FONT>
<BR><FONT SIZE=3D2></dtml-in></FONT>
</P>
<BR>
<P><FONT SIZE=3D2>> Jos van der Vleuten</FONT>
<BR><FONT SIZE=3D2>Programmeur / Analist </FONT>
<BR><FONT SIZE=3D2>> <A HREF=3D"http://www.walcheren-online.net" =
TARGET=3D"_blank">http://www.walcheren-online.net</A></FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> UCC Business Solutions</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Buizerdlaan 2</FONT>
<BR><FONT SIZE=3D2>> Postbus 1534</FONT>
<BR><FONT SIZE=3D2>> Nieuwegein </FONT>
<BR><FONT SIZE=3D2>> Telefoon +31 (0)30 6008600</FONT>
<BR><FONT SIZE=3D2>> Fax +31 (0)30 6008601</FONT>
<BR><FONT SIZE=3D2>> <A HREF=3D"http://www.ucc.nl" =
TARGET=3D"_blank">http://www.ucc.nl</A></FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Have a nice day !</FONT>
<BR><FONT SIZE=3D2>> </FONT>
</P>
</BODY>
</HTML>