Hello,
I would like to know if there is a built vars to know what was the last page
a user had visited?
I would like to build a basic navigation bar that will contain a back button
and I would like to know what was the last visited page so I could write
rule for different view depending from
Request.ENV.referer but it's not super reliable.
I thougth this :
In view I can get active url or function or what ever... :
{{session.last_visited_url=request.url}}
Last visited url : {{=session.last_visited_url}}
But then I would need to actualize these session variables on any events
that when the user make action... But I am blocked if
a href=javascript:void(history.go(-1))img src={{URL('static',
)}}/a
puts an image link that simulates the back button on the page. You could
convert it to button and use the jQuery alternative
Too much of a hack? The web2py framework is very good with history
integration.
You could put this at the top of your controller files (outside a def():)
and it would happen on every page visit:
session.last_visited_url=request.url
Thanks for the hint pbreit!
I think the : javascript:void(history.go(-1)) will do it for now...
Thanks all for your help.
Richard
On Tue, May 24, 2011 at 12:42 PM, pbreit pbreitenb...@gmail.com wrote:
You could put this at the top of your controller files (outside a def():)
and it would
6 matches
Mail list logo