[Zope] cookies + zpt
Jos van der Vleuten
Jos.van.der.Vleuten@transiciel.nl
Wed, 2 Apr 2003 16:21:07 +0200
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>cookies + zpt</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">hello list,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I want to use something like the Zope tutorial lesson 9 in ZPT, </FONT>
<BR><FONT SIZE=2 FACE="Arial">but i don't now how to do this. Any suggestions?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><dtml-call expr="RESPONSE.setCookie('lastVisited', _.DateTime())"></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><dtml-comment></FONT>
<BR><FONT SIZE=2 FACE="Arial">If this is their first time here set a default value</FONT>
<BR><FONT SIZE=2 FACE="Arial">for lastVisited, since they won't have the cookie yet.</FONT>
<BR><FONT SIZE=2 FACE="Arial"></dtml-comment></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><dtml-unless lastVisited></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <dtml-call "REQUEST.set('lastVisited','1999/01/01')"></FONT>
<BR><FONT SIZE=2 FACE="Arial"></dtml-unless></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><h2><dtml-var title></h2></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"><dtml-in "sightingsFolder.objectValues()"></FONT>
<BR><FONT SIZE=2 FACE="Arial"><dtml-if expr="bobobase_modification_time() > _.DateTime(lastVisited)"></FONT>
<BR><FONT SIZE=2 FACE="Arial"><b>New</b></FONT>
<BR><FONT SIZE=2 FACE="Arial"></dtml-if></FONT>
<BR><FONT SIZE=2 FACE="Arial"><dtml-var sequence-item></FONT>
<BR><FONT SIZE=2 FACE="Arial"></dtml-in></FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">cheers,</FONT>
<BR><FONT SIZE=2 FACE="Arial">Jos van der Vleuten</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>