Peter Bengtsson writes:
Did you see what happened?? I lost a variable I managed to set as a cookie when calling the FSSession object again towards the bottom! Why this? How to prevent it?
What I do in reality (the above pseudo) is that in standard_html_header I call the FSSession object and then use it to display custom Stylesheets. Then I call the FSSession object again to use it in standard_html_footer to use it to display different footers.
The <dtml-call FSSession> is vital to be able to begin to use it, but why isn't it enough just to do it once in standard_html_header in a code like this: <dtml-var standard_html_header> <h1>A Page</h1> <dtml-var standard_html_footer>
One simple alternative is to set a REQUEST variable in standard_html_header and use that instead of using the object in the standard_html_footer
Hello Peter You are supposed to call FSSession only once which initializes it for the whole transaction. Just don't call it again in 'standard_html_footer'. FSsession commits its data at the end of the transaction. By calling it again in 'standard_html_footer' you force it to reread its data before it had the chance to commit its old state. Let me know if it works. Maybe I should ignore additional calls to FSSession if they occur in the same transaction. Pavlos PS I am no longer on the 'zope' list so continue emailing me directly if you still have problems.