[Zope] URL Pathing.
Les Ferguson
lhf at xtra.co.nz
Mon Sep 13 16:01:43 EDT 2004
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.
Someone with more experience can probably give you some quick examples
if you maybe show a bit of the code you are using.
--
Les Ferguson
Software developer
Waitakere, NZ
More information about the Zope
mailing list