Determine Current View Mode ?
Posted: 2014-05-29 18:13
Anyone know of a way to determine the current View Mode, ie, List, Detail View, Print ?
A place where AppGini users can exchange ideas and help each other.
https://forums.appgini.com:443/phpbb/
https://forums.appgini.com:443/phpbb/viewtopic.php?f=2&t=1192
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;
}
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.