Try this code segment for a guide
PHP Code:
<?php
require_once("include/ListView/ListViewFacade.php");
// Create the bean for the module you want a listview for
$mybean = new Account;
// build listview facade object
$lvf = new ListViewFacade($mybean, $mybean->module_dir, 0);
// handle sort order and pagination
$params = array();
if(!empty($_REQUEST['orderBy'])) {
$params['orderBy'] = $_REQUEST['orderBy'];
$params['overrideOrder'] = true;
if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
}
// Hide the various action buttons
$lvf->lv->mergeduplicates = false;
$lvf->lv->showMassupdateFields = false;
$lvf->lv->email = false;
$lvf->template = 'include/ListView/ListViewNoMassUpdate.tpl';
// Now build the ListView and display it
$lvf->setup(
'',
'',
$params,
return_module_language($GLOBALS['current_language'], $mybean->module_dir),
0,
-1,
'',
strtoupper(get_class($mybean)),
array(),
'id'
);
echo $lvf->display($GLOBALS['app_list_strings']['moduleList'][$mybean->module_dir], 'main', TRUE);
Bookmarks