Hello!

 

I want to personalize a website. That is; I have a welcome page

with some links on, say link A, B and C. If a guest presses link B

I want that to affect the design of all the later pages that this guest sees.

However, if the guest returns to the welcome page and presses link C,

I want all the following pages that this guest sees, to have some other look

(the “C look”).

 

I am not so good at programming in python so I guess my easiest shot will

be to use cookies (please correct me if I am wrongJ). Now, I found some

example in the Zope book. If the guest chooses link B I could set a cookie

using the following statement:

 

  <dtml-call expr="RESPONSE.setCookie('guest_B')">

 

and then later for the page design, use some “if” statement like this:

 

  <if request.cookies.has_key('guest_B'>

 

(Please correct me if the program lines here are wrongJ, I am really not sure

about how to use the apostrophe ‘ sign in these statements)

 

 

But if the guest now goes back to the welcome page and chooses link C

he or she will still have the “guest_B” cookie. My question is then:

How do I erase the “guest_B” cookie?

 

 

Now, I am also slightly aware of that there is some parameter option in

thesetCookie” statement. That is: I could maybe have a setCookie statement

that went like this:

 

  <dtml-call expr="RESPONSE.setCookie('guest', ‘B’)">

 

and then use or change the parameter to the cookie “guest” My second

question is hence; if this would be a better solution than trying to erase

the cookie as previously described.

 

Thank you very much!

 

Børge Kjeldstad