[Zope] Counter in Zope question.

Kuraiken arashi1@pd.jaring.my
Thu, 30 Sep 1999 19:02:07 +0800


I can't remember who asked this question but here's a possible solution:

<dtml-with where-ever_visitor_counter_property_is_stored>
<dtml-let newvalue="visitor_counter+1">
<dtml-call "REQUEST.set('visitor_counter', newvalue)">
<dtml-call "manage_editProperties(REQUEST)">
</dtml-let>
</dtml-with>

Note: of course, the visitor_counter property has already been created
beforehand!
(type: int set to initial value of 0)

I think there's a more sophisticated way to make it but this one works. (You
don't have to have manage access) You might want to make checks to determine if
it's the same visitor (for that browser session) like normal counters
do...anyone care to improve/rewrite the above dtml?

-- 
-----------------------------------------
Kuraiken - Python fanatic.
-----------------------------------------
Python. Try it. It'll swallow you whole!
-----------------------------------------