I believe there is an upgrade safe way to accomplish that approach:
1. Create the folders and file custom/include/ListView/listview.config.php containing something like that:
PHP Code:
<?PHP
$list_max_entries_per_page = array(
'Accounts' => 15,
'Contacts' => 20,
'Leads' => 25,
'Opportunities' => 30,
);
?>
2. Create a custom view.list.php for each module you want to customize the number of records per page:
custom/modules/<ModuleName>/views/view.list.php
PHP Code:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.list.php');
class <ModuleName>ViewList extends ViewList {
function preDisplay() {
require_once('custom/include/ListView/listview.config.php');
global $sugar_config;
$sugar_config['list_max_entries_per_page'] = $list_max_entries_per_page[$this->bean->module_dir];
parent::preDisplay();
}
}
?>
Regards
Bookmarks