[Zope] easy question ? How to jump back to a previous page..
Peter Bengtsson
mail at peterbe.com
Thu Jun 17 06:29:24 EDT 2004
How about this::
<dtml-if expr="AUTHENTICATED_USER.getUserName() == 'Anonymous User'">
<dtml-call expr="RESPONSE.redirect('/login?came_from='+REQUEST.URL,
lock=1)">
</dtml-if>
Then your login page will know where to redirect the user back after.
This works in principle but you might have to be careful with cached pages.
Martin Koekenberg wrote:
> hello,
>
> I've a loginscreen (Session based User folder).
>
> In my index_html template is the folowing code :
>
> <dtml-if expr="AUTHENTICATED_USER.getUserName() == 'Anonymous User'">
> <dtml-call expr="RESPONSE.redirect('/login', lock=1)">
> </dtml-if>
> /login is the login page. But how can I automaticaly jump back (after a
> succesfull login) to de page that was requested before the loginscreen ?
>
> Example:
>
> I enter the site (http://beta.swol1894.nl). That page will forward me to
> the login. After a succesfull login I want a jump to the homepage.
> (That page send me to the login).
>
> Who know's a solution for this ?
>
> Greetings,
>
> Martin Koekenberg
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman-20/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman-20/listinfo/zope-announce
> http://mail.zope.org/mailman-20/listinfo/zope-dev )
--
Peter Bengtsson, http://www.peterbe.com
More information about the Zope
mailing list