[Zope] More REQUEST.set() not incrementing

Kevin Dangoor kid@kendermedia.com
Tue, 11 Jan 2000 17:07:09 -0500


Hi,

----- Original Message -----
From: <Jerry.Spicklemire@IFLYATA.COM>
To: <zope@zope.org>
Sent: Tuesday, January 11, 2000 4:49 PM
Subject: [Zope] More REQUEST.set() not incrementing


> So, one might conclude that the _ variables are not persistent, or are too
> persistent, depending on how you look at it.

This is the correct conclusion. If you want to store info like this in the
ZODB, you need to make a property. (Folders, ZClasses and DTML Documents can
all have properties). Let's say you wanted to count how many people access a
given Folder. You could add a property (count) to that Folder, and then put
the following in your standard_html_header:

<dtml-call "manage_changeProperties({'count': count+1})">

Note: this creates a new transaction for every page view on the Folder, and
your Data.fs will grow. (Not by much, but it will grow)

There are a couple counter products up on zope.org, I think, that may give
you some tips.

HTH,

Kevin