[Zope] How to redirect in ZPT.

Jason C. Leach jleach at ocis.net
Mon Feb 2 14:43:03 EST 2004


hi,

So I have a DTML I would like to convert to a ZPT.  Its name is index_html
and does this:
<dtml-call expr="RESPONSE.redirect(absolute_url() + '/' +
REQUEST['AUTHENTICATED_USER'].getUserName())">

The problem with this is I get a URL like:
http://www.foo.com/clients/index_html/myClient/someresource

And I can end up with URLs like:
http://www.foo.com/clients/index_html/myClient/bla/myClients/yyy/myClients/zzzz

and on and on and on. It works but the URL gets very long.


I would like that in a ZPT and was thinking:

<metal:foo tal:define="home user/getUserName">
  <html tal:content="here/clients/${home}/index_html"> </html>
</metal:foo>

but that does not work. I'm not sure how to get it to.

Thakns,
jason.





More information about the Zope mailing list