Thanks Kevin, I'll look up some "counter" code at Zope.org. Still I'm wondering about these : http://lists.zope.org/pipermail/zope/1999-September/011307.html http://lists.zope.org/pipermail/zope/1999-September/011312.html http://lists.zope.org/pipermail/zope/1999-September/011313.html Hi,
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})">
On Tue, 11 Jan 2000 Jerry.Spicklemire@IFLYATA.COM wrote:
<dtml-call "manage_changeProperties({'count': count+1})">
Note though that putting such code in your standard_html_header will create a new object for every request to your page. Not a good solution for a site with heavy traffic. Better store it on the filesystem directly. Pavlos
Based on the variable name listed in those messages, I think that person was trying to increment a variable that would be stored in a cookie. Things stored in REQUEST are not persistent... Properties are persistent on the server, and cookies are persistent on the client (depending on how you set the expiration) And, as Pavlos mentions, it's good to be aware if you're doing something that will increase your Data.fs on every view (such as a hit counter implemented with a property). Kevin ----- Original Message ----- From: <Jerry.Spicklemire@IFLYATA.COM> To: <zope@zope.org> Sent: Tuesday, January 11, 2000 5:36 PM Subject: [Zope] (no subject)
Thanks Kevin, I'll look up some "counter" code at Zope.org.
Still I'm wondering about these :
http://lists.zope.org/pipermail/zope/1999-September/011307.html
http://lists.zope.org/pipermail/zope/1999-September/011312.html
http://lists.zope.org/pipermail/zope/1999-September/011313.html
Hi all, This may be a dumb question but I have perused the docs and can't seem to find an answer. I am trying to catalog an attribute that doesn't seem to be either a field index or a text index. Lets say my example attribute is a list of subjects, and when I search for a document, I want to get documents of a certain subject. So I have a document that I want to appear under "Help" and "Monkeys" and in themselves I want to treat the subjects atomically (Field Index) , but I want more than one for each document (more TextIndexish, but not quite). So I was wondering can I do this with ZCatalog or sohuld I do it with other python logic. thanks -scott
participants (4)
-
Jerry.Spicklemire@IFLYATA.COM -
Kevin Dangoor -
Pavlos Christoforou -
scott kaplan