Problem with search results

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 16, 2013   (RSS)

By gkornbluth - May 16, 2013

Hi Paul,

This might not be the final solution, but: if you go to the Section Editor section in the left hand menu, then click modify on a section you want to edit. At the top of the modify section page should be 5 tabs, if you select the advanced tab you should see a per page drop down that allows you to select how many records should be displayed per page. Unfortunately this is only a per editor solution.

You can also search through the site's schema files and replace all occurrences of '_perPageDefault' => '25', with '_perPageDefault' => '1000'.

Dave Edis also offered a plugin for version 2.51 and above, that will change all of the default per page values on your site to any value you need.

He suggests backing up all of your /data/schema/ files first and then try this:

Copy the code below to as blank document, name it perpagechanger.php, upload it to your plugins folder and activate the plugin under Admin>plugins.

<?php


### UPDATE THESE VALUES
$GLOBALS['PERPAGECHANGER_NEWVALUE'] = 1000; //

// DON'T UPDATE ANYTHING BELOW THIS LINE

// plugin menu - add link
pluginAction_addHandlerAndLink(t('Update Sections'), 'perPageChanger', 'admins');

//
function perPageChanger() {
foreach (getSchemaTables() as $tableName) {
$schema = loadSchema($tableName);
$schema['_perPageDefault'] = $GLOBALS['PERPAGECHANGER_NEWVALUE'];
saveSchema($tableName, $schema);
alert("Updated '$tableName' to have a per page default value of {$GLOBALS['PERPAGECHANGER_NEWVALUE']}\n");
}
}

?>

Hope that helps,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By pault - May 16, 2013

Hi Jerry,

Thanks for the response, this is in fact what I've done as a workaround although I've noticed that the section takes a while to load now as it's displaying 1000 records on each page.

It's good advice though and does allow my client to perform their searches but would be good to work out what's going wrong.

Thanks, Paul.