[Zope] Simple Problem (SESSION)

Chris Withers chrisw@nipltd.com
Thu, 08 Aug 2002 08:25:50 +0100


DA Loeffler wrote:
> This seems to work:
> 
> <dtml-var standard_html_header>
> <dtml-unless "REQUEST.SESSION.has_key('foo')">
> <dtml-call "REQUEST.SESSION.set('foo',0)">
> </dtml-unless>
> <dtml-call "REQUEST.SESSION.set('foo', REQUEST.SESSION['foo']+1)">
> <h2><dtml-var title_or_id></h2>
> <p>
> You have visited this page <dtml-var "REQUEST.SESSION['foo']"> times.
> </p>
> <dtml-var standard_html_footer>

Yuk! Do that in a Python Script, or at very least put the logic in a python 
script and the presentation in a ZPT...

cheers,

Chris