Created
May 7, 2012 15:22
-
-
Save jmertic/2628370 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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; | |
| // Now build the ListView and display it | |
| $lvf->setup( | |
| 'include/ListView/ListViewNoMassUpdate.tpl', // template to use | |
| '', // where clause to pass to query to build listview | |
| $params, // parameters to pass to the ListView, see above. | |
| return_module_language($GLOBALS['current_language'], $mybean->module_dir), // mod_strings to use for this module | |
| ); | |
| echo $lvf->display( | |
| $GLOBALS['app_list_strings']['moduleList'][$mybean->module_dir], // title to use for the listview | |
| 'main', // legacy bit for modules in BC mode | |
| TRUE // true if we want the output returned to us, false if just to echo it out. | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment