Hello :) ..I try to send this message again, as I received no answer. Maybe it disappeared in the mess with the large virus attack some days ago. To personalize a website I use cookies. That is; when a person chooses a link, a cookie is set like this: <dtml-call expr="RESPONSE.setCookie('guest', 'C')"> Now, this cookie is used to either include or not include a table of contents on all of the following pages that I (or actually guest C) visits: <dtml-if expr="REQUEST.has_key('guest', 'C')"> <dtml-var site_map> </dtml-if> The <dtml-var site_map> looks like this: <a class="map" href="&dtml-URL0;?expand_all=1">Show all</a> <br> <a class="map" href="&dtml-URL0;?collapse_all=1">Hide all</a> <br> <dtml-tree expr="topics"> <a class="map" href="&dtml-absolute_url;"><dtml-var title_or_id></a> </dtml-tree> (topics is here the folder containing all the pages that guest C may visit) This works fine untill guest C presses some of the links generated by the <dtml-tree>. If he or she for instance presses the Page 1 link, he comes to page 1, but page 1 does not include the <dtml-var site_map> even though page 1 still has the same <dtml-if> statement: <dtml-if expr="REQUEST.has_key('guest', 'C')"> <dtml-var site_map> </dtml-if> It looks to me as if the cookie has disappeared. Or have I misunderstood the hole concept of the REQUEST object? What could be wrong? Thank you very much :) Børge Kjeldstad
Børge Kjeldstad wrote:
..I try to send this message again, as I received no answer. Maybe it disappeared in the mess with
Maybe it's because you post in HTML when specifically asked not to? ;-)
It looks to me as if the cookie has disappeared. Or have I misunderstood the hole concept of the REQUEST object?
You could look in REQUEST.cookies to be more on the safe side. I wonder what path is being set on your cookies? '/' is always a safe ebt to prevent wierdness like this. And, of course, you have to haev cookies enabled in your browser... cheers, Chris
participants (2)
-
Børge Kjeldstad -
Chris Withers