RE: [Zope] How to personalise a website?
Hi Børge, I'm new to Zope myself, but I have had some experience of this with a custom application that I wrote. The users are able to customise certain aspects of my application then the preferences are stored in a MySql database. When the user logs in, the application checks their user id and password but also reads in their preferences. These are used to apply style sheets and other various bits of customisation. If Zope supports cascading style sheets this may be the way to go. HTH Stephen Slack Senior System Developer Allvac (UK) Ltd -----Original Message----- From: Børge Kjeldstad [mailto:borge.kjeldstad@whiteflower.no] Sent: 19 August 2003 09:59 To: zope@zope.org Subject: [Zope] How to personalise a website? 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 wrong:-)). 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 wrong:-), 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 the "setCookie" 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
participants (1)
-
Slack, Stephen