Hi all.

I've made a custom grid single view, that is in the same html page where I 
call the complete grid.
When I call for request.env.http_referer for going back to the previous 
page I have inside the current page, not the previous one, the same html 
page but with the grid.
For example I make a search in the grid and I have:
http://.../default/products_listing?keywords=od

I click on a single view and I have:
http://.../default/products_listing/view/products/376?keywords=od

If I click on my back button I have again:
http://.../default/products_listing/view/products/376?keywords=od

I want to have:
http://.../default/products_listing?keywords=od

How can I make a back button ?

{{if request.args and request.args[-3] == 'view':}}
    {{=P(grid.view_form.record.code)}}
    {{=P(grid.view_form.record.description)}}
    <a class="button btn" href="{{request.env.http_referer}}">Back</a>
{{else:}}
    {{=grid}}
{{pass}}

Thanks.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to