1. In the incCommon.php file (found at the root of the app) add the following function (Courtesy of a.gneady):
Add the function at the very bottom of the file.
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;
}
#########################################################
Returned value from get_current_view():
e.g. $vew = get_current_view();
$vew would equal =
'TV' = table view
'TVP': print preview of table view
'DVP': print preview of detail view
'Filters': filters!
'DV': detail view
Depending upon your current View.
2. In the hooks folder, locate your table name hook (e.g. customers.php).
Add the following to the tablename_init() function at the top - e.g. customers_init
Code: Select all
$v = get_current_view();
if($v=='DV'){
$options->TableTitle='Customer Details';
}
Code: Select all
function customer_init(&$options, $memberInfo, &$args){
$v = get_current_view();
if($v=='DV'){
$options->TableTitle='Customer Details';
}
return TRUE;
}