In the controller that generates the grid, you can do:
if request.args and request.args[-3] == 'view':
response.view = 'path/to/other_view.html'
or you can use conditional code in the main view for the page:
{{if request.args and request.args[-3] == 'view':}}
[custom code to display record]
{{else:}}
{{=grid}}
{{pass}}
Anthony
On Tuesday, May 15, 2012 9:37:55 AM UTC-4, Marian Siwiak wrote:
>
> Dear all,
>
> I'm new to web2py, but I tried to search for an answer befor posting, I
> assure you.
>
> I've got datable, use SQLFORM.grid to display it, I have a "view" button
> which I can click and ge3t redirected to single record view.
> Question is: where can I define the template for the single record display
> page. For now it looks like it uses same template "db_manage.html", as the
> table display - I would like to have different template for single record
> view than I have for whole table.
>
> Thanks in advance,
> Marian
>