[Zope] URL Pathing.
Paul Winkler
pw_lists at slinkp.com
Mon Sep 13 22:20:45 EDT 2004
On Tue, Sep 14, 2004 at 08:01:43AM +1200, Les Ferguson wrote:
> Jason Leach wrote:
> >hi,
> >
> >If I have http://www.foo.com/ShoppingCart/addItem and it returns:
> >container.aq_parrent.myZPT(REQUEST=REQUEST) I end up with the URL:
> >http://www.foo.com/ShoppingCart/myZPT even though myZPT exists in the
> >parent folder (http://www.foo.com/myZPT). My problem is if people
> >keep adding things to the cart I end up with
> >www.foo.com/ShoppingCart/ShoppingCart/myZPT.
> >
> >I don't want that. It keeps recursing and getting longer. Show how
> >can I return a ZPT object and hot have the URL be nonsensical? Must I
> >do a redirection? Why can't I just return?
>
> I had that happen, I think you need to use one of your session vars from
> REQUEST, instead of relative paths. Build your URL based on
> REQUEST['URL0'] or URL1, BASE0, BASE1 etc.
Liberal usage of absolute_url() or absolute_url_path() is the way I go.
--
Paul Winkler
http://www.slinkp.com
More information about the Zope
mailing list