Determine Current View Mode ?
-
- AppGini Super Hero
- Posts: 54
- Joined: 2014-03-09 20:20
Determine Current View Mode ?
Anyone know of a way to determine the current View Mode, ie, List, Detail View, Print ?
-
- AppGini Super Hero
- Posts: 54
- Joined: 2014-03-09 20:20
Re: Determine Current View Mode ?
No answers to this either, huh?
I seem to have a gift for asking questions that gain no reply... yet other people must be curious as the posts get visited enough.
I seem to have a gift for asking questions that gain no reply... yet other people must be curious as the posts get visited enough.
Re: Determine Current View Mode ?
Try this:
To use it, just check the value returned from get_current_view():
TV = table view
TVP: print preview of table view
DVP: print preview of detail view
Filters: filters!
DV: detail view
Code: Select all
function get_current_view(){
$view = 'TV';
if($_REQUEST['Print_x'] != '' || $_REQUEST['PrintTV'] != '')
$view = 'TVP';
elseif($_REQUEST['dvprint_x'] != '' || $_REQUEST['PrintDV'] != '')
$view = 'DVP';
elseif($_REQUEST['Filter_x'] != '')
$view = 'Filters';
elseif(($_REQUEST['SelectedID'] && !$_REQUEST['deselect_x'] && !$_REQUEST['delete_x']) || $_REQUEST['addNew_x'] != '')
$view = 'DV';
return $view;
}
TV = table view
TVP: print preview of table view
DVP: print preview of detail view
Filters: filters!
DV: detail view
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
-
- AppGini Super Hero
- Posts: 54
- Joined: 2014-03-09 20:20
Re: Determine Current View Mode ?
Thank you - this worked perfectly.
-
- Posts: 2
- Joined: 2013-10-23 21:47
Re: Determine Current View Mode ?
Where do i insert that code?
I want to change the view. For example:
I have a Detail View of a table and i print that to my client, but i want to print another view without the amounts to my employee.
Is possible to use diferent templates with the same information? and how do i do that.
Best Regards
I want to change the view. For example:
I have a Detail View of a table and i print that to my client, but i want to print another view without the amounts to my employee.
Is possible to use diferent templates with the same information? and how do i do that.
Best Regards
Re: Determine Current View Mode ?
the get_current_view() code above you mean? You could insert it into the "hooks/__global.php" file.betopark60 wrote:Where do i insert that code?
Hmm .. currently it's not possible to have different print views for different users without manually editing the generated code. But we plan to add support for this in hooks in future releases.betopark60 wrote:I have a Detail View of a table and i print that to my client, but i want to print another view without the amounts to my employee.
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.