'Twas brillig, and iceangel89 at 29/04/09 09:33 did gyre and gimble:
i want to find out what is the URL that called a controller/action so that
after processing somethings (editing a record) i can go back to that exact
page. i am using Zend_Paginator so say i came from page 2 editing a record,
i want to return to page 2
There is no framework specific way to do this AFAIK.
You can check for HTTP_REFERRER HTTP header when you first land on your
edit page, but I would not rely on the browser setting that every time,
as different browsers may handle this differently.
What you could do is write something into a cookie or session variable
when you are on a page that supports being returned to (e.g. search
results etc.) and then use that info to go back.
A combination of both methods may be the most reliable, but you may
still want to code in a fallback for when no info is present (e.g. when
their session has timed out login in another window and they've directly
requested your edit page for example).
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]