Page 1 of 1

How to Open a New Blank Page when Clicking on a Record?

Posted: 2021-10-04 15:47
by mohamed
Hello,

How to redirect the Click of any record in the Table View, to open a new HTML blank page instead of the default Detail View HTML Page?!

Re: How to Open a New Blank Page when Clicking on a Record?

Posted: 2021-10-06 09:47
by onoehring
Hi Mohamed,

you could do two things
a) remove all "base"-links in the tableview.
This would require either
1. changing the base file AG uses to generate the tables layout (probably in /templates/tablename_TemplateTV). Be aware, that this file will be regenerated, once you (re)generate your app.
You can put there some link that leads to the page you wish.
or
2. use JS to remove all links from the rendered page

- or (imho better) -
b) make use of the _init function in /hooks/tablename.php.
Check, if a record was selected (check POST and GET parameters! for $selectedID). If there was a parameter set, the user "clicked on a record", thus: redirect to your "own" page instead of continuing.

PS: You might also want to use the setting in AG to open the details page in another page (not below TV). This might make things a little easier.

Handle with care - the above was just an idea.
Olaf

Re: How to Open a New Blank Page when Clicking on a Record?

Posted: 2022-07-28 12:26
by mohamed
Hi Olaf,

Sorry I did not get back to you earlier, as I have missed your feedback.

I just want to Thank You for your feedback.

Best Regards.