[Zope] Re: Force reloading of a zope form?
Maik Jablonski
maik.jablonski@uni-bielefeld.de
Sun, 12 Jan 2003 11:35:16 +0100
Patrick Price wrote:
> I am trying to set up a web site where I can choose different templates
> to change the style of the site. I store the template name in a browser
> cookie. All my documents/forms use the cookie to determine which
> template to render the site with.
>
> My selection mechanism is a DTML document named index_html which
> contains href links. These links call itself (index_html) with a
> template=n value tacked onto the URL eg: <a
> href="index_html?template=2">Use Template #2</a>
>
> I set the cookie if the "template" value is present when the document
> is called.
>
> The overall flow is:
> 1: document loads the original template1, based on pre-existing
> cookie, or default template if none
> 2: I select a new template with href link
> 3: link calls the document again (which still loads the original
> template based on as-yet unchanged cookie)
> 4: the document sets the cookie value to the new template setting
Hi,
1. ok
2. ok
3. wrong: your link should not call the document, but an
python-script/dtml-method instead which sets the cookie and...
4. ... redirects to your template
-mj