[Zope] How to create a trigger?

Evan Simpson evan@tokenexchange.com
Wed, 1 Sep 1999 10:14:18 -0500


If you want to

1. Set a variable for a single request, so that the page you clicked to can
use its value
2. Set a variable for all future requests from the person clicking the link
3. Set a variable for all future requests from everyone

then

1. Add "?vrbl=<dtml-var vrbl url_encode>" to the link's URL, or if it's a
literal value like 3, just "?vrbl=3".
2. Use <dtml-call "RESPONSE.SetCookie(...)">
3. Give the document or folder a property, then use <dtml-call
"doc.manage_changeProperties({vrbl: value})">

----- Original Message -----
From: Fredrick Rybarczyk - LUB NetLab <Fredrick.Rybarczyk@lub.lu.se>
> Hi,
> Sorry for this newbie question. Hope anyone has the time to help me out.
>
> I would like to do something like this within a dtml document that has a
> property:
> int my_property = 0
>
> <dtml-if "my_property==0">
> <a href= .. ???>press this to show some content</a>
> <dtml-else>
> <a href= .. ???>press this to hide some content</a>
> <dtml-/if>
>
> ... a bit down in the document
> <dtml-if "my_property>0">
> show some content
> <dtml-/if>
>
> ...or in plain words. I want to set the value of a property ( or
> variable if that would serve me better ) whenever I click on a link. Can
> someone please show how to do it?
> Thanks