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>
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.
I HAVE to call the FSSession object twice. Since I view only index_html, it uses the call of standard_html_header. standard_html_footer is called by index_html included into index_html I can't really explain it but standard_html_footer appear to be "independent" of standard_html_header (where the FSSession call occurs). Only the REQUEST object spans between both standard_html_header and standard_html_footer. What I would like to be able to do (see it as a bug report/feature request) is to call it and standard_html_header and still have it standard_html_footer with index_html as the link. Peter