[ZPT] Pass parameters via RESPONSE.redirect
Dieter Maurer
dieter@handshake.de
Fri, 13 Dec 2002 23:14:06 +0100
Rainer Thaden writes:
> i'd like to present a list of objects on a site and the user should
> have the option to change the parameters which define the list (e.g.
> display all obj from a certain author). On top of the site there's a
> form which passes the parameters to a script (author='bla') and the
> script redirects to that page.
> Looks like this:
>
> <form>: author -> select box
> action -> script, which gets authorname
> </form>
> <div tal:define="author request/author | python:'Mad Max'">
> list items
> </div>
>
> How do i pass the parameters given to the script to the page via the redirect?
> When i try to add the author to the request in the script like
> request.set('author',author)
> it doesn't show up in the request in the redirected page.
>
> In DTML there's something like passing keyword arguments to a response
> page which show up in request/options.
> Is there something similar in ZPT?
I have read that the "ZTUtils" package provides a function
"makequery" (maybe differently spelled) that should help
in buiding the required query string (see URL spec for "query string").
Dieter